press any key to exit c++
#include <iostream>
#include <cstdlib>
int main() {
std::cout << "Press any key to exit C++." << std::endl;
// Wait for a key press
std::cin.get();
// Exit the program
return 0;
}
#include <iostream>
#include <cstdlib>
int main() {
std::cout << "Press any key to exit C++." << std::endl;
// Wait for a key press
std::cin.get();
// Exit the program
return 0;
}