guys... i am new to c++ and i have write litle consol aplication and the problum is after compiling hte code the cmd is clossing verry fast.

so what i need to do is i need to stop closing the CMD verry quickly.
in c# i use "console.readline();"

so plzz help meee.. i am using MS visual studio

Recommended Answers

All 2 Replies

Put in a cin.get(); at the end of your code, before your return statement in main().
If the get() is being falsely triggered by an excess character in the stream, put in a cin.ignore() before the call to get().

cin.get(); is working....thankzxx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.