C++ - Programming Language
This course covers the basics of programming in C++. Work your way through the videos and we'll teach you everything you need to know to start your programming journey!

Variables

Lesson 6
Author : Mike Dane
Last Updated : November, 2017


Code

Copy/*
Names are case-sensitive and may begin with:
     letters, _
After, may include
     letters, numbers, _
Convention says
     Start with a lowercase word, then additional words are capitalized
     ex. myFirstVariable
*/

// #include <string>
string characterName = "George";
int characterAge = 70;

cout << "There once was a man named " << characterName << endl;
cout << "He was " << characterAge << " years old" << endl;
cout << "He really liked the name " << characterName << endl;
cout << "But didn't like being " << characterAge << endl;