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
p*=(++q)++*--p when p=q=1 while(q<=6)
Can the sizeof operator be used to tell the size of an array passed to a function?
Explain how can you tell whether two strings are the same?
Create a simple code fragment that will swap the values of two variables num1 and num2.
about c language
What is use of bit field?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
Explain what is a 'locale'?
What is the advantage of using #define to declare a constant?
how many errors in c explain deply
What is structure padding in c?
What is difference between function overloading and operator overloading?
Process by which one bit pattern in to another by bit wise operation is?
What language is windows 1.0 written?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?