thread: C++
View Single Post
  #44  
06-17-2011, 03:52 AM
Nate's Avatar
Nate
Oddworld Administrator
Rainbow of Flavour
 
: Apr 2002
: Seattle (woo!)
: 16,311
Blog Entries: 176
Rep Power: 41
Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)Nate  (13497)

:
Yes but they are huge arduous codes that slow down playability of an exe.

furthermore, I would like to make sure the Command Prompt doesn't close for my text based application. At the moment I am using:

:
std::cout << " Press the enter key to exit at any time" ;
std:cin.ignore(std::cin.rdbuf()->in_avail() +1);
To keep the app working but I would rather the player press something like pressing '0' to end the game because primarily, you need people to enter a choice with 'enter' key, you cannot do this with the above code.
Use
system("PAUSE")

As for the line break issue, that's an issue to do with the console, not your program. I don't think that the Windows console width can be changed, so you're better off just tweaking your program to only have short output strings.
__________________
:
Spending as long as I do here, it's easy to forget that Oddworld has actual fans.

Reply With Quote