Hi every one i have a problem with this program the conslo window disappear automatically without waiting , Im using return 0; function but it does not work

Recommended Answers

All 4 Replies

This thread discusses it at length:

The first suggestion, to have

 std::cout << "Press ENTER to continue...";
  std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );

right before your

return 0;

should be fine. This solution requires you to#include <limits> and #include <iostream>. There are many, many more solutions.

what is protected members?with example code

Please do not hijack existing threads with unrelated questions like this; in the future, start your own thread. In any case, the question is too broad, and has too many unknowns (regarding your state of knowledge, the context in which the question comes up, etc.) to be easily answered; it also comes across as a homework problem, and while we are willing to help you solve your homework, we won't do it all for you.

help me object oriented programming c++

Be a part of the DaniWeb community

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