Page 1 of 1

C++ how can you tweak this to read comma separated values

Posted: Tue Jul 12, 2022 8:09 am
by answerhappygod
C++ how can you tweak this to read comma separatedvalues
C How Can You Tweak This To Read Comma Separated Values 1
C How Can You Tweak This To Read Comma Separated Values 1 (6.41 KiB) Viewed 31 times
void read (vector list){ string str; ifstream file("data.txt"); while(file>>str) { char *co_str = new char[str.length() strcpy(co_str, str.c_str()); list.push_back(co_str); copy(list.begin(), list.end(), ostream_iterator(cout, "\n")); } + 1];