Inline functions

This is a discussion on Inline functions within the C++ Programming forums, part of the General Programming Boards category; My book does a crappy job on explaining when to use an inline function. Is there a rule of thumb ...

  1. #1
    Seņor Member
    Join Date
    Jan 2002
    Posts
    561

    Inline functions

    My book does a crappy job on explaining when to use an inline function. Is there a rule of thumb about when to use one?

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    If the code is really small, such that actually setting up the stack and passing the variables is a considerable amount of its execution tiime.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  3. #3
    Seņor Member
    Join Date
    Jan 2002
    Posts
    561
    Roughly how many lines would this function be? I know there is no exact number but I don't know how much code you mean.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inline Definitions and Declarations?
    By legit in forum C++ Programming
    Replies: 1
    Last Post: 06-15-2009, 02:59 PM
  2. Is it legal to have functions within functions?
    By Programmer_P in forum C++ Programming
    Replies: 13
    Last Post: 05-26-2009, 12:21 AM
  3. When to inline your *tors
    By Angus in forum C++ Programming
    Replies: 43
    Last Post: 10-29-2008, 04:38 PM
  4. conditional breakpoints and inline functions
    By Mario F. in forum C++ Programming
    Replies: 2
    Last Post: 08-10-2006, 09:30 PM
  5. inline friend functions.
    By sean in forum C++ Programming
    Replies: 2
    Last Post: 01-03-2002, 12:37 PM

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