Search found 6 matches

by Sir_Tripalot3
Fri Mar 05, 2010 9:28 pm
Forum: Programming Discussion
Topic: <solved>C++ problem system("pause") needed to prevent crash?
Replies: 9
Views: 652

Re: C++ (solved)problem system("pause") needed to prevent crash?

That particular error is fixed. I still have some errors later in the program, but I wasn't able to debug earlier because the system functions that I was using took forever and its hard to find where an error is if it takes 10 minutes to reach it. I think I can figure it out now. Thanks for the help...
by Sir_Tripalot3
Fri Mar 05, 2010 6:09 pm
Forum: Programming Discussion
Topic: <solved>C++ problem system("pause") needed to prevent crash?
Replies: 9
Views: 652

Re: C++ (solved)problem system("pause") needed to prevent crash?

I only wanted 1 variable x. I redefined x in the loop by mistake. . I don't understand why int xx is needed. Wouldn't int main (void) { cout << "Hello world!" << endl; int x = 0; int testArray[10] = { 0,1,2,3,4,5,6,7,8,9 }; for ( x = 0; (x < 5)&&(testArray[x]!=2); x++ ) { printf(&q...
by Sir_Tripalot3
Fri Mar 05, 2010 2:21 pm
Forum: Programming Discussion
Topic: <solved>C++ problem system("pause") needed to prevent crash?
Replies: 9
Views: 652

Re: C++ problem system("pause") needed to prevent crash?

Thanks, that was my problem!! I was defining x twice.
by Sir_Tripalot3
Fri Mar 05, 2010 11:34 am
Forum: Programming Discussion
Topic: <solved>C++ problem system("pause") needed to prevent crash?
Replies: 9
Views: 652

Re: C++ problem system("pause") needed to prevent crash?

I think the program crashes when turn==2 and no system command is used, or if the cout statement is used in the loop.
by Sir_Tripalot3
Fri Mar 05, 2010 10:36 am
Forum: Programming Discussion
Topic: <solved>C++ problem system("pause") needed to prevent crash?
Replies: 9
Views: 652

Re: C++ problem system("pause") needed to prevent crash?

I realize that system("pause"); is bad coding. I found the error when I tried to remove the system commands from my code. move is a virtual function in my piece class. My piece class probably should be an abstract class, but I needed to use piece addresses to reference subclass objects. vo...
by Sir_Tripalot3
Thu Mar 04, 2010 1:29 pm
Forum: Programming Discussion
Topic: <solved>C++ problem system("pause") needed to prevent crash?
Replies: 9
Views: 652

<solved>C++ problem system("pause") needed to prevent crash?

I am using a Dev-C++ compiler and my code is in C++. Problem: my program crashes when system("pause"); or system("color 0"); is removed from code on the second time this code is run. Program background: I am attempting to write a chess program with a computer player. This problem...