Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #37.0K
1 Posted Topic
[code=c] . . string line; vector<string>DataStore; ifstream file; file.open(fileName.c_str()); if (!file.is_open()){ cout<<"Error retrieving file " <<fileName<<endl; } while(getline(file,line)) { getline(file,line); stringstream lineStream(line); string bit; getline(lineStream, bit, ','); getline(lineStream, bit, '\n'); DataStore.push_back(bit); . . [/code] This piece of code takes a CSV and stores its data in a vector. The first … |
The End.