function pointer error

Posted by Codeguru on Stack Overflow See other posts from Stack Overflow or by Codeguru
Published on 2010-03-31T08:41:38Z Indexed on 2010/03/31 8:43 UTC
Read the original article Hit count: 396

Filed under:
|
|

Can anybody help me with this simple code??

include

using namespace std; void testFunction(){ cout<<"This is the test function 0"<

void testFunction1(){ cout<<"This is the test function 1"<

void testFunction2(){ cout<<"This is the test function 2"<

int main(){

//fp=testFunction;
(*fp[testFunction1])();
//cout<<"Addrees of the function pointer is:"<<*fp;

}

Iam getting the following error: error: invalid types `void (*[3])()[void ()()]' for array subscript|

© Stack Overflow or respective owner

Related posts about function

Related posts about pointer