# What does a semicolon do after a C++ class name?

C++ProgrammingObject Oriented Programming

If you have statements like −

Class Person;

This is a forward declaration. It lets the following code know that there is are classes with the name Person. This satisfies the compiler when it sees these names used. Later the linker will find the definition of the classes.

Published on 16-Feb-2018 06:21:08