Search found 7 matches
- Fri Mar 05, 2010 8:25 pm
- Forum: Programming Discussion
- Topic: <solved>C++ problem system("pause") needed to prevent crash?
- Replies: 9
- Views: 640
Re: C++ (solved)problem system("pause") needed to prevent crash?
Yeah I think what you put last will work fine. My issue was when you put the code like this: int x; // some more code for (int x=0; x<256&&moves[0][x]!='\0'; x++) { // blah, blah, blah } When you re-declare 'int x' you run into problems, but as you have it like int x; // some more code for (...
- Fri Mar 05, 2010 4:23 pm
- Forum: Programming Discussion
- Topic: <solved>C++ problem system("pause") needed to prevent crash?
- Replies: 9
- Views: 640
Re: C++ (solved)problem system("pause") needed to prevent crash?
Just to be clear, view this small example: #include <iostream> using namespace std; int main() { cout << "Hello world!" << endl; int xx = 0; int testArray[10] = { 0,1,2,3,4,5,6,7,8,9 }; for ( int x = 0; (x < 5)&&(testArray[x]!=2); x++ ) { printf("\ntestArray[%d] = %d", x,...
- Fri Mar 05, 2010 12:25 pm
- Forum: Programming Discussion
- Topic: <solved>C++ problem system("pause") needed to prevent crash?
- Replies: 9
- Views: 640
Re: C++ problem system("pause") needed to prevent crash?
Ok. Your move function(s) have some issues I think. When you write: int x; // what is going on here? x is the index of your for loop! get rid of this statement. have_moved=0; for (int x=0; x<256&&moves[0][x]!='\0'; x++){ // this is what your for loop is executing: nothing! nothing in between...
- Thu Mar 04, 2010 10:22 pm
- Forum: Programming Discussion
- Topic: <solved>C++ problem system("pause") needed to prevent crash?
- Replies: 9
- Views: 640
Re: C++ problem system("pause") needed to prevent crash?
1. System pause sucks . 2. Dev-C++ sucks. It is not a compiler, but rather an IDE. It uses a Mingw port of GCC (GNU Compiler Collection) as it's compiler, but the one it ships with is outdated. Most users do not upgrade. DevC++ is old, outdated, and no longer maintained. Ditch DevC++ and use Code Bl...
- Thu Mar 04, 2010 10:13 pm
- Forum: Programming Discussion
- Topic: [SOLVED]Problem with Focus on SDL CD
- Replies: 8
- Views: 1220
Re: Problem with Focus on SDL CD
Well you are entitled to a working copy of the CD since you bought the book, but the return policy might just be wasting a lot of time. I'd check into the return policy.
Also, maybe you could ask Ernest Pazera. You can find his contact info from google. He is a nice guy.
Also, maybe you could ask Ernest Pazera. You can find his contact info from google. He is a nice guy.
- Thu Mar 04, 2010 10:09 pm
- Forum: Programming Discussion
- Topic: My first sucessfull c++ game!
- Replies: 15
- Views: 1306
Re: My first sucessfull c++ game!
conio won't.
There are some possible substitutions though. In the future you may want to look into a more cross platform solution. But, basically I think there is always a better solution than conio. That is old school.
Congrats tho on your game.
There are some possible substitutions though. In the future you may want to look into a more cross platform solution. But, basically I think there is always a better solution than conio. That is old school.
Congrats tho on your game.
- Wed Mar 03, 2010 2:53 pm
- Forum: Programming Discussion
- Topic: SDL C++ Problem
- Replies: 4
- Views: 518
Re: SDL C++ Problem
Is your show() function all the render code? Basically, what I got from your description is that when you initiate a drop down menu it displays, but when you close it out it still appears. Is this the correct interpretation? In any case, the buffer is just like a giant chalkboard. When you write som...