Hi,
I have some questions, is getline function only used with arrays?
Can we use getline function for the classes without arrays?
This is a discussion on Hi got some questions within the C++ Programming forums, part of the General Programming Boards category; Hi, I have some questions, is getline function only used with arrays? Can we use getline function for the classes ...
Hi,
I have some questions, is getline function only used with arrays?
Can we use getline function for the classes without arrays?
What?
getline is a function used to read a line from a stream into a string.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
There are two versions of getline() one that works with C-strings and one that works with std::string. You need to use the proper version depending on what type of "string" you are using.
Jim
The other version should not be used unless you can state a very good exception.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^