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

There is nothing to do with class members here, we don't
see any. The function takes a constant pointer as a
parameter, when it is constant it cannot be changed
(although technically we can change by casting), then you
cannot use reference (&).

But who knows, compilers may accept, I haven't tested.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can we have joblib in a proc ?

2311


Can 'this' pointer by used in the constructor?

1100


i want to know the procedure of qualcomm for getting a job through offcampus

2476


Write a program to check palindrome number in c programming?

1025


What is the purpose of & in scanf?

1078


5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

2118


What is type qualifiers?

1141


How can I rethow can I return a sequence of random numbers which dont repeat at all?

1192


What are extern variables in c?

996


What is function and its example?

1231


What is NULL pointer?

1107


What is operator precedence?

1219


What are the advantages of using new operator as compared to the function malloc ()?

1354


Explain what’s a signal? Explain what do I use signals for?

1169


Apart from dennis ritchie who the other person who contributed in design of c language.

1407