Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

read comma separated text file in c++

#include <iostream>
#include <fstream>
#include <string>

ifstream file("filename.txt");
string data = "";
while(getline(file, data,','))
{
  cout << data << endl;
}
file.close();
 
PREVIOUS NEXT
Tagged: #read #comma #separated #text #file
ADD COMMENT
Topic
Name
5+6 =