Thread: Using function prototypes and inline functions

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    13

    Using function prototypes and inline functions

    When is it best to use a function prototype or inline function, within a class?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Use inline when the function is REALLY short (like one or two statements) (typically setter/getter functions).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 06-18-2009, 04:58 AM
  2. Setting up headers, functions etc.
    By DrSnuggles in forum C++ Programming
    Replies: 22
    Last Post: 10-24-2007, 01:37 PM
  3. error LNK2001: unresolved external symbol
    By Unregistered in forum C Programming
    Replies: 12
    Last Post: 07-12-2002, 08:45 PM
  4. class function declarations
    By HSC140 in forum C++ Programming
    Replies: 4
    Last Post: 03-25-2002, 11:23 PM
  5. Calling functions written in assembly?
    By The V. in forum C Programming
    Replies: 5
    Last Post: 10-24-2001, 08:11 PM