Article ID: 158200
Note Microsoft Visual C++ .NET 2002 and Microsoft Visual C++ .NET 2003 support both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. The information in this article applies only to unmanaged Visual C++ code. Microsoft Visual C++ 2005 supports both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model.
The sample code below illustrates how to use the string::getline STL function in Visual C++.
Note The class/parameter names in the prototype may not match the version in the header file. Some have been modified to improve readability.
DescriptionThe getline function creates a string containing all of the characters from the input stream until one of the following situations occurs:
Program Output is:
Enter a sentence (use <space> as the delimiter): A_space_at_the_end. You entered: A_space_at_the_end.
For the same topic about string::getline, visit the following MSDN Web site: http://msdn.microsoft.com/en-us/library/3ah895zy(VS.71).aspx
Article ID: 158200 - Last Review: June 22, 2014 - Revision: 7.0
Contact us for more help