Using function prototypes and inline functions

This is a discussion on Using function prototypes and inline functions within the C++ Programming forums, part of the General Programming Boards category; When is it best to use a function prototype or inline function, within a class?...

  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, 05:58 AM
  2. Setting up headers, functions etc.
    By DrSnuggles in forum C++ Programming
    Replies: 22
    Last Post: 10-24-2007, 02:37 PM
  3. error LNK2001: unresolved external symbol
    By Unregistered in forum C Programming
    Replies: 12
    Last Post: 07-12-2002, 09: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, 09:11 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21