Page MenuHomec4science

string_input.cpp
No OneTemporary

File Metadata

Created
Sun, Nov 3, 09:05

string_input.cpp

#include <iostream>
#include <string>
int main(int argc, char *argv[]) {
std::string name;
std::cout << "Enter your name and then hit RETURN\n";
std::getline(std::cin, name);
std::cout << "Your name is " << name << "\n";
return 0;
}

Event Timeline