0
4

4 回答 4

2

In your cpp file you need one more line:

ffunct Class::myfunct = NULL;

The class declaration said that the variable would exist somewhere but you never gave it a definition. Since it's not part of each object it has to be defined separately.

于 2013-05-09T23:10:52.927 回答
1

Your prototype of doSomething has a return type of double, but your implementation thereof has a return type of void.

static double doSomething(...)
...
void Class::doSomething(...)

Fixing this won't clear all the errors however. You still have a few more as the other answers mention.

于 2013-05-09T23:11:35.870 回答
1

static ffunct myfunct; is a declaration

You need a definition of it also in the cpp file

ffunct Class::myfunct;

于 2013-05-09T23:11:45.000 回答
0

add one line on the top of your .cpp file:

ffunct Class::myfunct=NULL;
于 2013-05-09T23:11:21.660 回答