small doubts from CPP

Thread Starter

ep.hobbyiest

Joined Aug 26, 2014
159
Hi,

I am CPP beginner. While reading one code on net, i found scope resolustion operator used for using function. Till the time i know, if one function declared in class and if it is defined outside of the class we will use (::) operator. like as follows.
class abc
{
void def();
}

void abc:: def ()
{

}
and for using we will write it as
abc.def();

But i didn't understand following thing.

instead of abc.def(); it is written abc::def(); in init function.
why it is used as abc::def()?
 
Top