[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppGetline
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppGetline
(C++) std::getline
Function in string.h, enabling you to read an entire line from std::cin.int main() { std::string myString; std::getline(std::cin,myString,'\n'); std::cout << "Entire line: " << myString << std::endl; }
- include <iostream>
- include <string>
Code links
- cin
- cout
- endl
- int
- iostream (header file)
- main
- std
- std::cin
- std::cout
- std::endl
- std::string (class)
- string (class)
- string (header file)
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
