class foo {
public:
static int func(const char*& p) const;
};

This is illegal, why?

Answer Posted / revathy

static functions can access static data only
Thus this is illegal

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the value of c?

576


Why doesn't C support function overloading?

1624


What is a newline escape sequence?

669


What is the advantage of c?

613


Who developed c language?

644






What does & mean in scanf?

606


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

776


what are enumerations in C

726


What is return type in c?

646


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

657


What is the difference between fread and fwrite function?

642


In which language linux is written?

607


write an algorithm to display a square matrix.

2229


write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.

1989


In C language what is a 'dangling pointer'?

644