ok, im somewhat of an advanced programmer for the windows-side of C/C++, and the system command to pause the console is 'system("pause");'.... i just recently transfered over to Slackware 3.3 (yes, its old, but i <3 text), and pause is not the command for pausing the command line. is there any way to do this is *nix where the console pauses until the user hits anykey .... plz dont send my messages saying use cin>> or cin.getline() because thats not what im looking for... i want something similar to windows .com PAUSE.
Not unless you specifically set stdin to unbuffered...
How about:
Granted, launching a whole new process isn't the most efficient way to do this, but you never cared about that before, so if you're looking for a quick and simple solution this will work. It will wait for one and only one keyboard hit, unlike jim's similar solution, which waits for the enter key.
ahh thank you much. im just going to keep it in that form and just call from the function when needed and use it as a global function. oh btw Corona is the best beer ever invented.
6) printf "\n GoodBye! \n\n"; exit ;;
I am trying modify the above command to pause a couple of seconds before exiting, so a message can be displayed. Thank you :). (8 Replies)
All of my machines (various open source derivatives on x86 and amd64) store argv above the stack (at a higher memory address). I am curious to learn if any systems store argv below the stack (at a lower memory address).
I am particularly interested in proprietary Unices, such as Solaris, HP-UX,... (9 Replies)
ok...
Take a look at the snippets below.
What does it mean a construct like:
void function()
type var;
{
funct code...
}
hmmm.. i dont get it. my compiler either.
void log_message(filename,message)
char *filename;
char *message;
{
FILE *logfile;
logfile=fopen(filename,"a");... (5 Replies)
I guess I posted in wrong forum before. How do I pause another process and then restart it on linux? The other process doesn't listen for anything.
Thanks for any help you can offer.
Dane :confused: (1 Reply)