Lessons
C++ · Objects · 51. Classes and Objects
step 1 of 7
A blueprint for things
A class is a blueprint. Dog says every dog has a name and an age.
Dog a; builds one real dog — an object. The dot reaches inside it: a.name.
Mission
Build a second dog b named Bobo, age 5, and print it too.
PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
← press me!
Press RUN to see what this program does.