Easier View

Very sorry, The posts are all mixed-up . View blog archieve to start learning =D

About Me

My name is Luke Chin. Here to teach you guys how to code C++

Wednesday, April 11, 2007

Using input in programs (Strings)

#include // input output header file
#include // string header file

int main() // you MAIN function

{
std::string name; // string varaible name

std::cout << "enter your name"; // prompting for the users name std::cin >> name; // accepting name
std::cout << "Hi , " << name; // printing hi , name

system("pause"); // this is used to pause the application


return 0; // ending your program
}

No comments: