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

Reply via email to