Google News
logo
CPP - Interview Questions
How can you specify a class in C++?
By using the keyword class followed by identifier (name of class) you can specify the class in C++. Inside curly brackets, body of the class is defined. It is terminated by semi-colon in the end.
class name{
// some data
// some functions
};
Advertisement