Y
ypjofficial
Hi all,
what's difference does it make when we define the member function
inside and outside a class?
I am using vc7.
when i define the member functions outside a class with the scope
resolution operator and put everything inside a .h file (also note that
i have put the include guard to avoid multiple inclusion of the same
header file accedently ) and include this file in multiple source file
from a same project then i get the error of "function already defined
in some *.obj file.."
so to avoid that now when i put all the member function definitions
inside a class the same project compiles successfully...
could any please tell me the reason behind this behaviour?
Regards,
Yogesh Joshi
what's difference does it make when we define the member function
inside and outside a class?
I am using vc7.
when i define the member functions outside a class with the scope
resolution operator and put everything inside a .h file (also note that
i have put the include guard to avoid multiple inclusion of the same
header file accedently ) and include this file in multiple source file
from a same project then i get the error of "function already defined
in some *.obj file.."
so to avoid that now when i put all the member function definitions
inside a class the same project compiles successfully...
could any please tell me the reason behind this behaviour?
Regards,
Yogesh Joshi