Hi all,
Can you please tell me how to read .csv files in C++/VC++??
I converted my excel files to .csv files in order to make reading easy.
Need help regarding the code.
Thanks
Rishi.
Hi all,
Can you please tell me how to read .csv files in C++/VC++??
I converted my excel files to .csv files in order to make reading easy.
Need help regarding the code.
Thanks
Rishi.
I presume each word separated by a comma, will represent a variable in a class declaration.
For example,
.csv file
Sugar, Big jugs, slightly kooky, 18,
Might be represented as
class Hoe
{
string name;
string description;
string intelligence;
int age;
}
You can use the comma as a delimiter to parse the string into tokens and assign them to your class variables.
Also, regarding Sturm's link to reading files, might be slightly dubious due to !myfile.EOF. Although I just read it briefly so it might be ok. That website is normally good.
HI..
Thnx for the reply....
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.