What are the ways to pause console page after run in C++?
I mean I want to pause and stop the console page after run a program in C++ in order to analyze outputs , so please explain how can I pause the program after run it?
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Michal HabalcikRank #902 · 2.3K reputationPosted Jan 1, 2015, 8:41 AM EST
getchar();
Michal HabalcikRank #902 · 2.3K reputationPosted Jan 1, 2015, 9:14 AM EST
Joe WilsonRank #631 · 3.8K reputationPosted Jan 1, 2015, 9:06 AM EST
Joe WilsonRank #631 · 3.8K reputationPosted Jan 1, 2015, 9:47 AM EST
Graph G(nodes.size(), false);
for(nit = nodes.begin(); nit != nodes.end(); nit++)
{
G.insert(nit->file1, nit->file2, nit->f);;
}
cout << endl << "The graph contains" << endl << endl;
G.show();
std::getchar();