Inline functions

This is a discussion on Inline functions within the C++ Programming forums, part of the General Programming Boards category; Hi there, Kindly help me on this matter. I do have a class with an inline funciton whenever I compile ...

  1. #1
    Unregistered
    Guest

    Inline functions

    Hi there,

    Kindly help me on this matter. I do have a class with an inline funciton whenever I compile it , it gives me a warning about inline functions are not expanded.

    The class is shown below.

    class Customers
    {

    float amounts[10];
    public:
    void sortData()
    {

    int ctr;
    ctr=0;

    while(ctr < 10)
    {
    cout << "Enter the amount : ";
    cin >> amounts[ctr];
    ctr++;
    }
    int counter=0;
    /* Traverse The Array */
    while(counter < 9)
    {
    float temp;
    /* Compare The Value Of Current Element With The Next */
    if(amounts[counter] > amounts[counter + 1])
    {
    /* Swap The Values */
    temp = amounts[counter];
    amounts[counter] = amounts[counter + 1];
    amounts[counter + 1] = temp;
    counter = 0;
    continue;
    }
    counter++;
    }
    }


    };

    thanks
    curious mind

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    7
    and you are using which compiler?

    compiles fine under MSVC

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, 11:37 AM

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