i have an assignment. i'm using a previously designed Card class.
the user inputs the data for each card object.((int1-4)suit,(int 1-13) rank and if its picked(bool))
then by using cards mem functions i output the values to the file
outfile << card.getSuit() << "\n"; ...etc
^^thats done in a while loop, keeps going till the user answers that he doesnt want to create any more cards
then there is another while loop for outputting from a file.
--> while(infile.peek() != EOF)
in there i wanned to use getline, but it gives me an error
error -could not find a match for getline/......
idk if my getline syntax is good - its getline(infile, s); i tried that..and also with specifying a delimiter
so i ended up using infile >> s;
but i realy wanna be able to use getline..
any help appreciated
the user inputs the data for each card object.((int1-4)suit,(int 1-13) rank and if its picked(bool))
then by using cards mem functions i output the values to the file
outfile << card.getSuit() << "\n"; ...etc
^^thats done in a while loop, keeps going till the user answers that he doesnt want to create any more cards
then there is another while loop for outputting from a file.
--> while(infile.peek() != EOF)
in there i wanned to use getline, but it gives me an error
error -could not find a match for getline/......
idk if my getline syntax is good - its getline(infile, s); i tried that..and also with specifying a delimiter
so i ended up using infile >> s;
but i realy wanna be able to use getline..
any help appreciated