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...

class foo {
public:
static int func(const char*& p) const;
};

This is illegal, why?

Answer Posted / john gummadi

"const" cannot be used along with reference. And the function itself is const which means it cannot change any parameters. So no place for the reference here. If you really need reference, then get id of consts.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

code for quick sort?

1984


What does sizeof return c?

1005


Why c is known as a mother language?

1036


What is clrscr ()?

1055


write a program to find out prime number using sieve case?

2034


Explain null pointer.

1039


What is difference between scanf and gets?

1166


Explain how do you declare an array that will hold more than 64kb of data?

1397


Why flag is used in c?

1067


Why shouldn’t I start variable names with underscores?

1004


Explain what is a 'locale'?

1013


Should a function contain a return statement if it does not return a value?

1011


Describe the steps to insert data into a singly linked list.

1017


Differentiate Source Codes from Object Codes

1476


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

1046