Thread: Inline functions

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

    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
    560
    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, 01:59 PM
  2. Is it legal to have functions within functions?
    By Programmer_P in forum C++ Programming
    Replies: 13
    Last Post: 05-25-2009, 11:21 PM
  3. When to inline your *tors
    By Angus in forum C++ Programming
    Replies: 43
    Last Post: 10-29-2008, 03:38 PM
  4. conditional breakpoints and inline functions
    By Mario F. in forum C++ Programming
    Replies: 2
    Last Post: 08-10-2006, 08:30 PM
  5. inline friend functions.
    By sean in forum C++ Programming
    Replies: 2
    Last Post: 01-03-2002, 12:37 PM