Re: Complies but doesn't run
any way i think its a good idea for a new programmer to get into the habit of commenting their code. but thats me.
So! Rayman any other problems?
Another thing you might want to do is use <cstdio> (include it), it lets you use Command Prompt comands, pause, cls, ect. used by system("commnd"), example system("pause")
i use pause A LOT!!!!
Really makes things easier
Re: Complies but doesn't run
Quote:
Originally Posted by H aun
any way i think its a good idea for a new programmer to get into the habit of commenting their code.
It is, but one must also learn not just to comment but to comment appropriately.
Quote:
Originally Posted by H aun
Another thing you might want to do is use cstdio (include it), it lets you use Command Prompt comands, pause, cls, ect. used by system("commnd"), example system("pause")
i use pause A LOT!!!!
Really makes things easier
It does? It sounds like you are simulating a debugger, but back in post #2 Paul McKenzie already suggested that Rayman452 learn how to use a debugger.
Re: Complies but doesn't run
no, it works in the program
Re: Complies but doesn't run
Quote:
Originally Posted by H aun
no, it works in the program
How does it "make things easier"? I do not see how the use of such platform dependent external utilities will benefit Rayman452's program.
Incidentally, std::system() is found in <cstdlib>, not <cstdio>.
Re: Complies but doesn't run
well with out the system("pauses") you need to go into command prompt, then navigate to the executibal and run it.
You put the pauses in places (well at least for me) when something is read out and nothing is being entered.
example
Code:
void errorcm()
{
cout << ent << " Is Not A Command" << '\n' ;
system("pause");
system("cls");
help();
}
that paused it after displaying
Quote:
"asdf" is not a command
and the cleared it up, so the stuff in help() could be displayed more cleanly
also im using Dev C++ and system("") is the function for that, and the <cstdio> is not the system stuff, thanks for correcting me.
Re: Complies but doesn't run
Quote:
Originally Posted by H aun
well with out the system("pauses") you need to go into command prompt, then navigate to the executibal and run it.
That is the way a command line program is supposed to be run (or you could run it from say, a batch file). Rayman452 is using Visual Studio 2008, and that IDE is likely to keep the console window open when running the program via the IDE. Even if it does not, inserting a break point at the end of the program should be a suitable workaround.
Re: Complies but doesn't run
I dipped into Visual studios, always kicked my butt. might dip back in there