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
what is a function method?give example?
Tell me the use of bit field in c language?
Explain how do you sort filenames in a directory?
Can you apply link and association interchangeably?
Explain heap and queue.
How do you write a program which produces its own source code as output?
what are # pragma staments?
What are pointers? What are different types of pointers?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
How to find a missed value, if you want to store 100 values in a 99 sized array?
When should the const modifier be used?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
Is register a keyword in c?
How #define works?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.