Just a quick C++ syntax question
Hi,
I have been writting all my OpenGL programs in pascal, using Delphi so far, cause they were for school projects. I feel I am now ready to start a littl 3D engine, and decided it would be much better to write it in +++.
Anyways, my question is, what is the point of using inline function in a class? Is there anything bad about using them?
Thanks for any help,
Jack
Hi,
You use inline functions while you specify the interface for a function in the header file and do the actual implement of the function in the .cpp file. If you dont use inline functions in this situation then you''ll get a linker error.
Hope that helps,
Dave
You use inline functions while you specify the interface for a function in the header file and do the actual implement of the function in the .cpp file. If you dont use inline functions in this situation then you''ll get a linker error.
Hope that helps,
Dave
Well, assuming we''re talking about C++, inline functions are inserted without the overhead of calling a function (pushing the parameters to the stack, et cetera). They are kind of like macros, except the they are a little more type friendly and the compiler doesn''t have to heed your request to make that function inline.
"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said

http://druidgames.cjb.net/
"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said

http://druidgames.cjb.net/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement