In the following code:
#include <iostream>
#include <string>
using namespace std;
int main() {
string my_str;
cout << "Enter a large string:" << endl;
getline (cin, my_str);
cout << my_str << endl;
return 0;
}
When a large string (without any white spaces) is entered, only the first 4095 characters are printed. Why? (Ubuntu 14.4, g++ 4.9.3)
Thanks.