General C++ Programming - March 2012 (Page 15)

by hannah
Problems in my code!
 
my code is a game between 2 players. Both starting at 3 0 1 they need to get to 0. I need to work out: If player1 thows first how many games out of 1000 will h...
[4 replies] Last: Thanks alot! (by hannah)
issues
 
i got an assignment to make a program that makes webpages. i need help with getline and ordering of steps. here is my code, i cant find out how it get stuck in ...
[19 replies] Last: i got it working, i used cin.ignore(), i am using xcode if you are won... (by ui uiho)
Bitstacks Quest
 
I'm aiming to write some unsigned numbers to a network packet. The shortest way I calculate to write this information is what I call "bitstacks". This may be a ...
[11 replies] Last: Ah yeah, that is because the least significant digits come last in our... (by Athar)
Game Blender 3d engine/Bullet Physics engine help
 
Im merely looking for a tutorial on the following engines http://en.wikipedia.org/wiki/Game_Blender http://en.wikipedia.org/wiki/Bullet_(software) blende...
[no replies]
Loop Issue..
 
I'm trying to run a crypto with some data inside it and i cant seem to get it to work correctly. 2b 00 01 00 70 af 8d 6a 00 65 66 71 00 00 00 00 00 67 00 2d 1...
[13 replies] Last: After fighting with it i was able to solve it. void CCrypt::EnCrypt... (by faceofdevil)
Auto-destruction of classes within classes
 
Hello all, This may be a simple question but I wanted to ask those who know more than me. I have two classes made. Each one is a queue using linked lists a...
[3 replies] Last: Hi! It's not quite like that. Class #2 is really simple (I don't see... (by OradFarez)
by hgabe
help reading files
 
peek poll pop poke 1369 push 42 push 43 push 16 poll pop poll push 13 poll peek push 69 poll push 23 skidoo poll peek push 0849 poll peek pop poll pop poll po...
[1 reply] : while the file is OK for reading     read in the first word of th... (by LB)
Resizeing vector, out_of_range
 
I have an application where I need to reallocate vectors, as they tend to run out of room. vector<int> myHits(10000); int i; int count = 0; for (vecto...
[3 replies] Last: You should use reserve() to tell the vector that you are planning on h... (by LB)
Algorithm efficiency
 
In terms of Big-O notation, if I'm looking to label the efficiency of the following algorithms what would they fall under? I have some educated guesses at them ...
[1 reply] : Removing an object from an array and reorganizing the array: O(1+n-i) ... (by viliml)
Need some basic C++ help
 
I have a problem to solve, that sorts the 10 worst players basing on the sum of their POINTS. ( poenik + poenis ) This is the whole code: #include <iostr...
[2 replies] Last: Perfect! It worked, thanks a lot buddy! (by Bashkim Ukshini)
string lost
 
hey i am working on a project that creates html for the user, note that i barely know any html. the problem is a good about of code does not ever get input into...
[no replies]
by rzaj
Help with Error Message: Stack around Variable was Corrupted
 
Once I run my program, I keep getting the error message: Run-Time Check Failure #2 - Stack around the variable 'numTimes' was corrupted. Would someone be able t...
[2 replies] Last: Hi What are doing in the following loop, freq ++; ?? cant sum b... (by therockon7throw)
CLASS doubt
 
Hi guys, I have doubt in using class #include "A.h" class A B // where B is class A is header file.. { public: B(){} //method declarat...
[1 reply] : That code is not legal C++. You must have copied it incorrectly. I... (by Disch)
HAVING TROUBLE OVERLOADING THE EXTRACTION OPERATOR
 
Hi there, i want to overload the extraction operator >> to read a pair of numbers in the following form (4,6). i have struggled for 10hours. I COULD REALLY USE ...
[3 replies] Last: Hi Couldyou post the structure of your Pair class ? what you are att... (by therockon7throw)
by Zapeth
Is it unusual/not recommended to call constructor of child in parent class?
 
Hi, title is my question. I have a base/parent class A and two child classes B and C. And I would like to create new objects of B or C in a function in A (I o...
[4 replies] Last: Ok sorry guys, once again I thought way too complicated and overlooked... (by Zapeth)
Container for different sibling classes
 
There are a lot of ways of doing this, but as a scientific programmer I am making an effort to redo this project in a more elegant way, to try to encounter more...
[no replies]
what does this mean?
 
while(cin.get() != '\n'); What is the meaning of this?
[2 replies] Last: what about this: while(cin.get() != '\n'); cout << e... (by malvado)
Class Constructor parameters.
 
Hi, im currently trying to design a level editor for a school project. Im using WinAPI code, and i'm havin trouble with the classes creating the base window. Th...
[2 replies] Last: Hi, if at the top you click "Edit Topic" you can move the topic yourse... (by LB)
Merge arrays or vectors
 
I'm about to make a part of a program where I merge data stored in different vectors, or arrays depending on how smooth merging the two structures are. Whats...
[1 reply] : vector<MyStruct> a; vectot<MyStruct> b; //fill a and b with stuff vec... (by LB)
Comparing strings
 
I try to compare strings with find(), but it doesn't seem to work. ref is a big string, searchVector is a vector of type string. What I wanna do is, traverse t...
[2 replies] Last: Hmm... But I can't seem to get it returning the position of the hit to... (by liquidfuzz)
March 2012 Pages: 1... 1314151617... 49
  Archived months: [feb2012] [apr2012]

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