0
How to read commas from a file
Streams
2 Antworten
+ 2
#include <iostream>
#include <fstream>
using namespace std;
int main () {
string line;
ifstream myfile ("example.txt");
if (myfile.is_open()) {
while ( getline (myfile,line) ) {
cout << line << '\n';
}
myfile.close();
} else
cout << "Unable to open file";
return 0;
}
0
Thanks