General C++ Programming - October 2012 (Page 29)

I need Help...
 
Please help me out solve the following problem using classes, I might need it ASAP.. I believe in you programmers, I know the problem statement is quiet long bu...
[1 reply] : What is your specific problem? where are you stuck? (by codewalker)
Create File
 
Im trying to open a file than it creates the same file but different name. case IDB_TESTBUTTON: { ...
[1 reply] : You're not checking return codes for errors. (by kbw)
Why is Codeblocks terminating my program with Status 3?
 
I'm programming with SDL and CodeBlocks. The problem I have is when I initialize a surface the program crashes...every time. It actually comes on for a split ...
[3 replies] Last: @James2250 *muffs head* Thanks! I did not even initialize funny... (by dtaqee88)
Menu doesn't work
 
Hi every one Iam stuck with this code since a week. My program is doing good in showing the output. but nothing peforn when I chose any thing from the m...
[1 reply] : First, please edit your post so that it uses code tags - the <> butto... (by TheIdeasMan)
Cannot instantiate abstract class
 
This keeps happening to me: class base_room { public: //==Variables==// int w,h; std::vector<base_entity*> entities; std::vector<base_particle...
[2 replies] Last: Huh apparently I left a version of it buried in main. Thanks alot. (by Tyler Hummel)
Question About Different (Feasible) Methods of Memory Management
 
As a few of you may know I am working on this one man project, a complex beast. I'm working on my game/media engine. I have implemented such things as smart ptr...
[12 replies] Last: If you want to see the code, i can PM it to you if you want, it works ... (by DeXecipher)
Game Development and Compilers
 
Hi guys, I remember a couple of months ago, I was watching Markus Persson (developer of Minecraft)on youtube coding on two monitors. On one, was the game run...
[4 replies] Last: Thanks for the help guys. I thought maybe there would be a simple down... (by toomanystars)
Sorting lists
 
deleted
[1 reply] : Add to the Stock struct one more field that represents the precedence ... (by webJose)
Running the race
 
Running the Race Write a program that asks for the names of three runners and the time it took each of them to finish a race. The program should display who ca...
[5 replies] Last: #include <iostream> using namespace std; int main() { string ru... (by rhoninho)
Error Messages
 
Hey guys, I've got this code I'm working on for homework and it's pretty complete I just can't seem to figure out how to fix these error messages. Here's th...
[4 replies] Last: I would suggest doing something like the following: #include <iostre... (by cire)
Need help with this program about the presidential poll
 
Here is the description of my program: Election Polling: Write a utility program that reads: the name of a state (example: new_york) the poll A's number...
[3 replies] Last: int pollA1,pollA2,pollA3,pollB1,pollB2,pollB3 (should be double) RPA,O... (by dougok07)
How to append to binary file?
 
i am probably not including the ios::app correctly..... it won't let me append to the critters.bin file Here is my code: //header struct Cat { char...
[1 reply] : Ive tried another approach and it still wont work: #include <iost... (by s123456)
Licensing your code
 
What is the best license to protect the code to my game, and all of its resources like graphics and music? Links also please.
[3 replies] Last: If you're going to close the source later, I recommend that you don't ... (by helios)
Defining a static member variable
 
Lets say I have a class in a header file as such: class X { public: static int myStaticVar; }; static int X::myStaticVar = 5; Now every t...
[5 replies] Last: When you include your header file with X's definition in other .cpp fi... (by rollie)
Overloading [] and Ternary trees
 
I am trying to build a ternary tree. How do I overload the operator so that when the main executes a = key2;, key1 and key2 will be added to the tree in the...
[1 reply] : Thank you for giving my the chance to provide this response. http://l... (by rollie)
For loops
 
I need a program with a nested for loop. It asks the user for n, a postive value, if it is negative it exits the program. once n is entered positively it must m...
[1 reply] : I think there may be something you aren't showing us, but one glaring ... (by rollie)
I'm trying to implement something similar to this in my program
 
Can somebody tell me what i did wrong? I am really confused. (I have over 450 lines of code in my main program and because of a similar problem to this example ...
[13 replies] Last: If you wanna try to fix my memory leak problem, go ahead, ill give yo... (by cire)
BMI Program
 
Need help with a program that will not display if and else if statements. Am I doing something wrong? Any helpful tips would be greatly appreciated. //This pr...
[2 replies] Last: The prompt says a BMI between 18.5 and 25 is optimal weight. Then shou... (by Sena2012)
Nested for loops
 
I am totally lost with nested for loops. I have to write a C++ program that does the following: 1. Asks the user to enter an odd positive integer m. 2. Reads ...
[no replies]
by Mau
adding random numbers using & function?
 
When i compile it come up with an error that says that control reaches end of non-void function why isn't it working. #include <iostream> #include <ctime> ...
[3 replies] Last: okay now it works thanks. but the odd number is giving me a huge numbe... (by Mau)
October 2012 Pages: 1... 2728293031... 50
  Archived months: [sep2012] [nov2012]

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