.exe exits after program being called

I have this code in this format:
int main()
some function();

The program just exits after function being called (function executes when i type some texT) How to prevent this and let it stay even after function is called and another thing, When i type some text it prints some thing, again if i type text it should clear the previous print text and print a new text
Thanks hope you understand and help me
I've tried the first one it still exits
Ah, then things could get messy.
The most sensible thing to do is to use an IDE that keeps the console open for you after the program terminates, such as Code::Blocks.
add a steatemen just before
return 0;

and hader file
closed account (zwA4jE8b)
std::cin.get(); //what I use
Topic archived. No new replies allowed.