All Tools Bookmark

Share

http://www.online-toolz.com/howto/how-to-read-csv-file-in-c++.php

Facebook Share Twitter Share

How to read csv file in C++

The code snippets below shows How to read csv file in C++




		while (getline(file, ID, ',')) {
			cout << "ID: " << ID << " " ; 

			getline(file, nome, ',') ;
			cout << "User: " << nome << " " ;

			getline(file, idade, ',') ;
			cout << "Idade: " << idade << " "  ; 

			getline(file, genero);
			cout << "Sexo: " <<  genero<< " "  ;
		}

        
source