Could someone explain the proper usage of getline? I am trying to use it, but i do not understand it's formatting.
This is a discussion on help with getline. within the C Programming forums, part of the General Programming Boards category; Could someone explain the proper usage of getline? I am trying to use it, but i do not understand it's ...
Could someone explain the proper usage of getline? I am trying to use it, but i do not understand it's formatting.
Getline is for C++. You are sure you are programming for C++ and not C?
Getline reads a line from the file stream and stores it into a std::string buffer.
Code:std::string str; getline(cin, str); // To read one line from the command prompt
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
well, that makes sense then. I'm trying to use something from the wrong language...