I wanted to read huge input as a sting but it doesn't work on my linux box. When I tried to insert string ( huge) , it stopped me to add any character once I reached 2998 character.
std::string s;
std::cin.clear();
cout<< "Enter string"<<endl;;
getline(cin, s);
So I decided to add the huge string in a file and read from there. Now I have a file which contains only a single line , how would I print the string ( getline() doesn't work because it can not read more than 2998 bytes in my linux system ).
For example I have following input ( part of a file),
cat\n\ndog\ts\n\n\nmarket\g\he\n
Output should be:
cat
dog\ts
market\g\he
Appreciate your help.