this is my codeCode:int main( int countc, char *argv[]) { ifstream in("input.txt"); char c; while(in>>c) { if(c == '\n') cout << "\n"; cout << c; } }
input file is
output is:Code:1, a, 2 1, d, 4 3, b, 2 3, c, 4 5, e, 4
I have two query:Code:1,a,21,d,43,b,23,c,45,e,4
1. why it is not reading blank spaces or '\n'?
2. what to modify to read blank spaces and 'n' both?