Inline functions?

B

bill

If I inline a function must I also use the inline keyword in the function
prototype?



Like this:



/* My H file */

inline void do_stuff(void); /* Prototype */



/* My C file */

inline void do_stuff(void)

{

/* do stuff here */

}
 
I

Ian Collins

bill said:
If I inline a function must I also use the inline keyword in the function
prototype?

No. Don't forget the keyword is only a hint, it does not force the
function to be inline.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top