All about C++
Tuesday, October 27, 2015
What is your name? in C++
// Example program
#include <iostream>
#include <string>
int main()
{
std::string name;
std::cout << "What is your name? ";
getline (std::cin, name);
std::cout << "Hello, " << name << "!\n";
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment