i want to read a file and put each line in a string (each line contains a single word)
i've used getline
but it doesn't work neither does the >>
command.
here's my code:
(i'm using visual studio)
string device_kind;
ifstream bank_info;
bank_info.open ("acquirer.info");
bank_info >> device_kind; //fails to compile
getline (bank_info, device_kind); //also fails
bank_info.close();