Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are inline functions?

Answer Posted / roshanpr

Functions that are expanded inline ( that we during there
call) is called inline functions.

Usually when there there is a function call the control is
taken to the function definition where the code is executed
and then the control returns back to main. But in case of
inline function there is no jump in the flow, rather the
function it self is expanded at the place of call.

You can make function inline in two ways.

1) Prefixing keyword "inline" durin the function
declaration.
2) By defining the function inside the class declaration

Ex: shows both the implementation

Class myClass
{

int age;

public:
inline void getAge();
void showAge()
{
cout<<"Age:"<<age;
}
};

void myClass getAge()
{
cout<<"Age:"<<age;
}

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between equal to (==) and assignment operator (=)?

1079


Write a program using display() function which takes two arguments.

1085


Is turbo c++ free?

1082


What is operator overloading in c++ example?

1142


What is a constant reference?

1079


What do you mean by function overriding & function overloading in c++?

1193


What is the difference between ++ count and count ++?

1147


What is null pointer and void pointer?

1083


What is low level language in simple words?

1032


What is null c++?

1142


What is an associative container in c++?

1072


How many types of comments are there in c++?

989


Is facebook written in c++?

1001


Is it possible for a member function to use delete this?

1082


I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

2074