Everyone. I've been using CLion for some time and I do like it, except one thing. Maybe somebody had the same problem.
The thing is that when I print something in console, the IDE prints it back. For example, if I run that code
#include <iostream>
#include <string>
int main() {
std::string message;
std::getline(std::cin, message);
std::cout << "You've printed: " << message;
return 0;
}
the IDE will act like this: Printing back
I think that problem lies in CMake, but as a newy I have no idea how to fix it. Could you help me?
I ran into the same problem.
Seems like it is a known issue, related to MinGW and bugged in JetBrains tracker: https://youtrack.jetbrains.com/issue/CPP-2580#u=1443705085694
It is just an issue with IDE / terminal obviously, program will run properly if run outside of the IDE.
That's probably because getline returns an istream& parameter