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
Combinations of fibanocci prime series
What are terms in math?
What is the usage of the pointer in c?
What is a macro?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
How do you write a program which produces its own source code as output?
What is the process to create increment and decrement stamen in c?
What are the differences between new and malloc in C?
What is the scope of an external variable in c?
In C programming, what command or code can be used to determine if a number of odd or even?
Write a program to implement queue.
Explain what is gets() function?
What are the main characteristics of c language describe the structure of ac program?
Explain what is operator promotion?