Thread: inline??

  1. #1
    Registered User
    Join Date
    Aug 2001
    Location
    Fort Worth, TX
    Posts
    53

    inline??

    I used inline on some methods in my header file, will the be inline from that point or do I have to put inline in my .cpp file.


    example:

    class fff
    {

    inline int func();
    }

    int fff::func() // do I need inline here also?
    {
    }

  2. #2
    Unregistered
    Guest
    You dont need inline, but even if you add it, the compiler wont take it as wrong. Try it.

  3. #3
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,138
    Inline just hints the compiler to replace the function call with the function code, instead of jumping to the function and returning from it. However, the compiler will ignore you if it is inefficient.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. When to inline your *tors
    By Angus in forum C++ Programming
    Replies: 43
    Last Post: 10-29-2008, 03:38 PM
  2. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  3. Certain functions
    By Lurker in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2003, 01:26 AM
  4. bit shifting
    By Nor in forum C++ Programming
    Replies: 9
    Last Post: 08-08-2003, 11:55 AM
  5. Replies: 5
    Last Post: 09-17-2001, 06:18 AM