Ask coding questions

← Back to all posts
why is it saying "no matching function for getline"
Sprite127

I need help? I have no clue what is wrong.

Voters
Sprite127
Comments
hotnewtop
SixBeeps

According to semi-official sources, the second parameter takes in a string object. I rarely every use C++, but from the looks of it, you're trying to read lines from a char object.

I think C++ is trying to find a getline function with the signature (istream, char) when in actuality the signature is (istream, string), which is why there's no matching function.