How to create inline

Hi I am newbie so sorry for some of my questions.
I have created an empty win32 console application
I have my .h under my header file, .cpp under my source files and now want to know where and what item to use to add my inline class.
Thanks
You can't inline a class.
Ok so if I have #include "face.inl" in my project called face.h

where should I create my face.inl and call or include it in my face.h for it to work

Thanks all for your help


Dont know if this is compiler specific or not, but I thought that inline was unnecessary nowadays cause the compiler does it automatically(Visual Studio atleast). This is what Ive been told atleast.
what do you have in this "face.inl" file? and more general, what do you try to do (purpose of including some strange files in your header) ?
Read the article on #includes and writing your own headers here: http://www.cplusplus.com/forum/articles/10627/
It should answer most of your questions.
And once again, you cannot inline a class. You can inline any function, and functions defined in class scope are auto-inline, but inlining a class is a syntax error.
@omk, the compiler generally *might* inline automatically but the compiler's judgement is probably no better than yours. Besides, those optimizations are infringing on the user's control to the point where it would be questionable to apply. In addition there's no way to force the compiler to inline so you may as well make it clear that you intend to inline.
Thanks all
tummychow your link has been really helpful
Topic archived. No new replies allowed.