I am learning C ++ and in the book I am reading it explains (a bit above) how to use the getline () function, so I wrote this code to test it:
#include <iostream>
#include <string>
using namespace std;
main ()
{
string prueba;
getline(cin, prueba, ",");
cout << prueba;
}
The problem is that this error is thrown at me by the build messages (I am using Code: Blocks as IDE and MinGw as a compiler):
error: no matching function for call to 'getline((std:istream&, std::__cxxll::string&,...
(The error is on line 9)