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

p*=(++q)++*--p when p=q=1 while(q<=6)

1713


Can the sizeof operator be used to tell the size of an array passed to a function?

1075


Explain how can you tell whether two strings are the same?

992


Create a simple code fragment that will swap the values of two variables num1 and num2.

1243


about c language

1972


What is use of bit field?

1257


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4643


Explain what is a 'locale'?

1026


What is the advantage of using #define to declare a constant?

1052


how many errors in c explain deply

2054


What is structure padding in c?

1076


What is difference between function overloading and operator overloading?

1062


Process by which one bit pattern in to another by bit wise operation is?

1120


What language is windows 1.0 written?

1006


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2322