lundi 1 juin 2020

How can i read in a comma separated file into 2D int array?

So I have a file with 4 lines which reads as follows: 1,1,1,1 1,1,1,1 1,1,1,1 1,1,1,1

I'm trying to read in all that and store in 2D int array. I can only read in the first line when I use the stoi function. Any suggestions on how I can read all the lines.

Aucun commentaire:

Enregistrer un commentaire