Functions

are there any functions that:
quit the program right there
delete things that have been shown already in the program
pause for a certain amount of time (not system("pause"))
quit the program right there


Yes, but this is generally considered bad form.

The function is exit: http://cplusplus.com/reference/clibrary/cstdlib/exit/

delete things that have been shown already in the program


You mean clear the screen? I assume you're talking about the console.

There are ways to do it, but none that are standard. It's also not something you generally need to (or should) do in a console program.

See this article: http://cplusplus.com/forum/articles/10515/

pause for a certain amount of time (not system("pause"))


None that are standard.

WinAPI has Sleep( milliseconds_to_sleep ) (#include <windows.h>), and there are other similar functions for other APIs.

And while sleeping is very useful in games, it doesn't have much use place in a console program.
i suggest, on your free time that is, exploring the libraries. You merit a lot of experience that way. & this type of stuff will become rudimentary to you.
Topic archived. No new replies allowed.