|
-
January 24th, 2009, 01:56 PM
#16
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
Last edited by H aun; January 24th, 2009 at 03:45 PM.
Reason: more info, correcting info
-
January 24th, 2009, 02:02 PM
#17
Re: Complies but doesn't run
 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.
 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.
-
January 24th, 2009, 03:27 PM
#18
Re: Complies but doesn't run
no, it works in the program
-
January 24th, 2009, 03:33 PM
#19
Re: Complies but doesn't run
 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>.
-
January 24th, 2009, 03:39 PM
#20
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
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.
Last edited by H aun; January 24th, 2009 at 03:42 PM.
Reason: stuff
-
January 24th, 2009, 03:45 PM
#21
Re: Complies but doesn't run
 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.
Last edited by laserlight; January 24th, 2009 at 03:49 PM.
-
January 24th, 2009, 03:56 PM
#22
Re: Complies but doesn't run
I dipped into Visual studios, always kicked my butt. might dip back in there
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|