0
Why to use function outside the class using scope resolution operator???
3 odpowiedzi
+ 2
In usual class definitions are in header file and function definition in source file.
0
Code reading gets easy as member variables n function declarations in class definition. And function definition outside class.
0
ok if your function contain iteration statement like loop then you must defined body of that function outside of class, so scope operator use to tell compiler that this function belongs to that particullar class which is not a inline function, so in execution that part of function must be link with that class using linker.