how do i change some thing when im working in a c++ source file then run the .exe it like pretty much closes right when i open it ? and how do i keep it from saying 'press any key to continue'
When I was first starting out, I used an otherwise-meaningless call to getch() to hold up program termination until I was ready for it...
Btw, this isn't really bot-related. You should have posted in the general programming forum.
You can also #include <stdio.h> and at the bottom put in a system("pause") (on pc).
If you're on linux, it's all good since it runs in terminal anyway and you wouldn't have that problem.
If you're on mac, get a real computer.
you missed something...
what if your mac runs linux :p
Oh yeah and OS X is based on Bsd so it's unix ish you can get a terminal and run stuff so again you shouldn't have trouble... unless you have os9 then i have to agree get a real computer.
If there's a picture of an apple anywhere on the computer the it's garbage.. sorry :P
mmmm apple.
int endme;
cout << "\nPress any key";
cin >> endme;
Haha OMG in all my time programming, I never thought of doing something as easy as easy as what Necrosis suggested. By the way, it would work a little different since the user would also have to press enter.
I still prefer getch().
printf( "Press any key to terminate" );
getch();
return 0;
Too bad getch is non-standard.
You could get the best of both worlds (not having to press enter + standard function) with cin.get();
getc(stdin); // this will work and it's standard!
QuoteBtw, this isn't really bot-related. You should have posted in the general programming forum.
This is the general programming forum lol
QuoteThis is the general programming forum lol
Probably because someone moved the topic...
QuoteProbably because someone moved the topic...
Indeed.