M
Massimiliano Alberti
My program is heavily template based, and I use the VC++, so I have to keep
the templates in the header file. My .cpp files are quite empty (they are
more a connection between header files). Now, my "problem" is that I can't
put the body of classless functions in the header files. I normally "solve"
this problem using the "inline" keyword (inline functions must be in header
files, but the compiler doesn't have to "inline" inline functions). Is there
a better way to do it? (yes... I know... this is an estetical problem )
Can someone tell me why a class can have the body of the methods "inline" in
the header while a classless function can't? Are there istorical reasons?
--- bye
the templates in the header file. My .cpp files are quite empty (they are
more a connection between header files). Now, my "problem" is that I can't
put the body of classless functions in the header files. I normally "solve"
this problem using the "inline" keyword (inline functions must be in header
files, but the compiler doesn't have to "inline" inline functions). Is there
a better way to do it? (yes... I know... this is an estetical problem )
Can someone tell me why a class can have the body of the methods "inline" in
the header while a classless function can't? Are there istorical reasons?
--- bye