General C++ Programming - December 2015 (Page 15)

Using Bitwise Ops to Decode Message
 
// The output is showing: BAACDALMEGFOLPPHCDBMDGAEDPHBA which is obviously // not a deciphered message. I know the first word should be: 'BE' with a // ...
[2 replies] Last: Here's the right code: #include <iostream> #include <cmath> using nam... (by scodges81)
by Madjid
Anyone can help me to create this program?
 
Create a matrix A , whose elements Aij are the distance between point i and j. A number of points defined in a plane by means of their coordinates Xi and Yi, th...
[5 replies] Last: Duplicated post: http://www.cplusplus.com/forum/beginner/180764/ (by chicofeo)
Templates
 
I have this very simple class template program which I created to better understand templates, but the damn thing wont run because there is an unresolved extern...
[8 replies] Last: Ah I see, so its useless to define the destructor but then put = defau... (by alex067)
by Ozzy69
Help me in file
 
Hello, i'm with a doubt in capture keyboard keys as "shift" because when I press shift + 2 for example, I would like that appears to the @, but I can not set up...
[no replies]
Vector overwritten every time ->push_back() is used
 
If anybody could help me, I would be eternally grateful... I've been stuck on this issue for days:( I'm attempting to have a class called "Client" that has a v...
[6 replies] Last: File only maintains a pointer to this buffer. It doesn't store a nam... (by xismn)
pointer loop only iterates once.
 
I can't get this loop to iterate more than once. All my loops so far have been a breeze. What am I doing wrong? I am thinking it must be the logic? but I don't...
[6 replies] Last: Appreciate !! Thx for the sage advice. I like the autonomous facet, so... (by technologist)
by a10e29
Explain what's wrong LNK 2005
 
Greetings and Salutations! This constructor is giving me a LNK2005 error: /* #include "Piece.h" Piece::Piece() { xpos = 0; ypos = 0; actions...
[5 replies] Last: That'll do it! Glad you figured it out. (by JayhawkZombie)
std::vector simple push_back crash
 
Hello everybody ! First, be indulgent with my language: I'm french. In fact, the problem is : I've a class (Database) which have a variable std::vector...
[2 replies] Last: Hi Peter87, oh I see, so I have to write the size of the vector, run ... (by Sefiria30)
Using 2-way communication between objects
 
I originally posted this in "Beginners", but maybe it would be better fit to be here. That and "Beginners" is getting flooded with some guy making tons of spam...
[11 replies] Last: I apologize for not marking this as solved. Since I have, for some re... (by JayhawkZombie)
Reading string till you find '|' then compare and then do something after
 
Hey everyone. So i have a function which gets a string from a function which accepts user input username as std::string. password: only as int (restricts user...
[4 replies] Last: An alternative: #include <fstream> #include <iostream> #include <rege... (by cire)
Checking for a loop of numbers
 
I need to write a program that applies a certain rule to a number if it is even, and another one if it's odd. Then once the rule is applied, if the number that ...
[4 replies] Last: Oh, thanks that's exactly what I was looking for (by rawry1000)
A problem with a ship tracking program.
 
Hi all, this is another HW and I've got a problem and can't figure out what's wrong. The goal is: "Starfleet would like you to write a program to keep track of...
[1 reply] : loadData loops incorrectly on eof. putData relies on numOfShips ... (by cire)
Using a struct variable of type
 
Hi ya all, I've got a HW and I'm so stuck. Okay, so here's what my prof wants us to do, "Write a program that prompts to read students' names followed by thei...
[1 reply] : 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
Finding most common char in a string.
 
I have worked on this without asking for help and figured out most of what to do. Unfortunately, this code keeps outputting the last letter in the string instea...
[3 replies] Last: Do the inner loop variables hold a value even when the loop finishes?... (by MikeyBoy)
can anyone help to remove this error.
 
#include <stdio.h> #ifndef ___osiBus_h___ #include "osiBus.h" #endif /*void fun(int CTRread ); void fun2(int CTRwrite ); static int a=0,b=0,c=0,d=...
[4 replies] Last: can you please tell me how and where to declare them. Are those sym... (by MikeyBoy)
Passing 2D dynamic created array (using pointer) as const
 
Hello, i have created 2D dynamic array using pointers like this: double **matice = new double* ; for (int i = 0; i < m; i++) matice = new double ; and ...
[7 replies] Last: When the type definition gets complicated like that, you might find it... (by MikeyBoy)
.dat file
 
Zzz
[1 reply] : You've gotten one response, and it was from me, and it was me telling ... (by JayhawkZombie)
Getting values from ini file
 
I'm using this class: http://www.codeproject.com/Articles/10809/A-Small-Class-to-Read-INI-File The format of my ini file: TP1_X=-1130 TP1_Y=543 TP2_X=591 TP...
[2 replies] Last: It turns out, it was working, but my file path was wrong. ... (by SeeLemon)
Double Linked List, insert before current
 
I need to insert a node before the current pointer, however when I try to insert a node, it will produce an unhandled exception error @ line 117 #include <i...
[1 reply] : current is not a good idea, because you don't know what it is. You ... (by coder777)
by kapoor
c++ oop homework help ??
 
I have c++ homework due tomorrow and need help.. i tried learning online but no help.. if anyone can help , please do . basically i have to write the class and ...
[11 replies] Last: A vector can store anything - it uses templates. If you want to have ... (by JayhawkZombie)
December 2015 Pages: 1... 1314151617... 22
  Archived months: [nov2015] [jan2016]

This is an archived page. To post a new message, go to the current page.