Open randomwangran opened 6 years ago
https://github.com/randomwangran/cpp/blob/d15efa12ec8465221a5ec91210926fc6f9c86101/learnCpp/Chapter9/9.x/9.x.4.d.cpp#L82-L93
This is part is actually very simple to solve:
double userInput; in>> userInput; point = FixedPoint2(userInput); return in;
The problem is the code at the end of the main function:
std::cout << "Press enter to exit" << std::endl; std::cin.get();
This causes the problem.
You could use:
system("pause");
https://github.com/randomwangran/cpp/blob/d15efa12ec8465221a5ec91210926fc6f9c86101/learnCpp/Chapter9/9.x/9.x.4.d.cpp#L82-L93
This is part is actually very simple to solve:
The problem is the code at the end of the main function:
This causes the problem.
You could use: