Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Inline functions?

Reply
Thread Tools

Inline functions?

 
 
bill
Guest
Posts: n/a
 
      04-30-2009
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 */

}






 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      04-30-2009
bill wrote:
> 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.


--
Ian Collins
 
Reply With Quote
 
 
 
 
bill
Guest
Posts: n/a
 
      04-30-2009
"Ian Collins" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

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


Thank you.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tool which expands implicitly inline inline functions tthunder@gmx.de C++ 3 06-16-2005 12:54 AM
To inline or not to inline? Alvin C++ 7 05-06-2005 03:04 PM
Function delcared inline but not defined inline Nish C Programming 4 10-08-2004 03:31 PM
External inline functions calling internal inline functions Daniel Vallstrom C Programming 2 11-21-2003 01:57 PM
inline or not to inline in C++ Abhi C++ 2 07-03-2003 12:07 AM



Advertisments