class declaration syntax in c++ code example
Example 1: classes c++
class class_name {
access_specifier_1:
member1;
access_specifier_2:
member2;
...
} object_names;
Example 2: c++ classes
class SampleClass
{
int a;
public:
SampleClass(int v)
{
a=v;
}
int RetVal()
{
return a;
}
};