vcherubini
Programmer
Hello:
I am brand new to C++, and am a native Perl programmer.
What I was wondering, is how would you exit a program after someone has pressed the Enter key.
I know in Perl it is
[tt]
while (<>) {
exit;
}
[/tt]
Where the [tt]while()[/tt] statement waits for the user to press Enter, and when that condition is true, it exits the program.
How would do you this in C++?
All help is appreciated greatly.
Thank you.
-Vic [sig]<p>vic cherubini<br><a href=mailto:malice365@hotmail.com>malice365@hotmail.com</a><br><a href= software</a><br>====<br>
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director<br>
Wants to Know: Java, Cold Fusion, Tcl/TK<br>
====[/sig]
I am brand new to C++, and am a native Perl programmer.
What I was wondering, is how would you exit a program after someone has pressed the Enter key.
I know in Perl it is
[tt]
while (<>) {
exit;
}
[/tt]
Where the [tt]while()[/tt] statement waits for the user to press Enter, and when that condition is true, it exits the program.
How would do you this in C++?
All help is appreciated greatly.
Thank you.
-Vic [sig]<p>vic cherubini<br><a href=mailto:malice365@hotmail.com>malice365@hotmail.com</a><br><a href= software</a><br>====<br>
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director<br>
Wants to Know: Java, Cold Fusion, Tcl/TK<br>
====[/sig]