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
Explain the difference between ++u and u++?
What are unions in c?
Explain spaghetti programming?
What is the difference between local variable and global variable in c?
State two uses of pointers in C?
How can I open a file so that other programs can update it at the same time?
Can we assign integer value to char in c?
What is the difference between near, far and huge pointers?
What is hash table in c?
What is const and volatile in c?
What are categories used for in c?
How to throw some light on the b tree?
Explain the meaning of keyword 'extern' in a function declaration.
How can I read in an object file and jump to locations in it?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;