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

When is the “void” keyword used in a function?

1497


What is ## preprocessor operator in c?

1084


What is the stack in c?

1130


What is the best way to store flag values in a program?

1072


i have a written test for microland please give me test pattern

2730


what are enumerations in C

1161


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

3225


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

1232


If null and 0 are equivalent as null pointer constants, which should I use?

1214


Explain is it better to bitshift a value than to multiply by 2?

1198


Why flag is used in c?

1130


Explain zero based addressing.

1023


Is a pointer a kind of array?

1178


What will be the outcome of the following conditional statement if the value of variable s is 10?

1284


Is calloc better than malloc?

1015