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

What is variables in c?

984


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1046


What is a program flowchart and explain how does it help in writing a program?

1225


Is it better to use a macro or a function?

1099


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

1000


Write a program to maintain student’s record. Record should not be available to any unauthorized user. There are three (3) categories of users. Each user has its own type. It depends upon user’s type that which kind of operations user can perform. Their types and options are mentioned below: 1. Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record) 2. Super Admin (Search Record [by Reg. No or Name], View All Records, Insert New Record, Modify Existing Record, Delete Single Record) 3. Guest (Search Record [by Reg. No or Name], View All Records) When first time program runs, it asks to create accounts. Each user type has only 1 account (which means that there can be maximum 3 accounts). In account creation, following options are required: Login Name: <6-10 alphabets long, should be unique> Password: <6-10 alphabets long, should not display characters when user type> Confirm Password: Account Type: Login Name, Password and Account Type should be stored in a separate file in encrypted form. (Encryption means that actual information should be changed and Decryption means that Encrypted information is changed back to the actual information) If any of the above mentioned requirement(s) does not meet then point out mistake and ask user to specify information again. When Program is launched with already created accounts, it will ask for user name and password to authenticate. On successful authentication, give options according to the user’s type.

1931


What are examples of structures?

1027


What is .obj file in c?

1023


List some of the dynamic data structures in C?

1192


What are the header files used in c language?

995


what is stack , heap ,code segment,and data segment

2634


largest Of three Number using without if condition?

1527


Which is more efficient, a switch statement or an if else chain?

969


What are the properties of union in c?

995


Why does not c have an exponentiation operator?

998