0

[Help] Getting error with cout<<read.get(ch); ??

#include<iostream> #include<fstream> #include<string> using namespace std; int main() { char ch; ifstream read; read.open("sam.txt"); while (!read.eof()) { if (read.get(ch)) { cout << read.get(ch); cout << ch << endl; } } return 0; }

17th Mar 2020, 2:33 PM
Sami
Sami - avatar
1 Answer