[Bug c++/91044] /home/hugo/Code_Block/C++_Tutorial/cadenas_tipo_c.cpp|12|error: no matching function for call to ‘getline(std::string [50], int, char)’|
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 1 19:02:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91044
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to hugo from comment #2)
> Please see the following page that defines a getline:
> https://en.cppreference.com/w/cpp/string/basic_string/getline
That's the URL I gave you.
> This other page defines another type of getline:
> https://en.cppreference.com/w/cpp/string/basic_string/getline
That's the same URL again.
> And if you compile the sample source code, you get an error in the line
> where the following instruction is: for (std::string line;
> std::getline(input, line); ) {
> sum += std::stoi(line);
No you don't, it compiles fine.
> Can you help me?
No, this is the wrong place to learn C++. Try https://stackoverflow.com
More information about the Gcc-bugs
mailing list