1>e:\程序\c++\tbar_foo\tbar_foo\Bar_Foo.h(20) : error C2059: 语法错误 : “常量”
#include<iostream>using namespace std;
class Foo
{
public:
Foo(int f)
{ fooval=f; }
int GetVal()
{
return fooval;
}
private:
int fooval;
friend class Bar;
};
class Bar
{
private:
//static int barval;
static Foo foo(5);
int callsFooVal;
public:
Bar()
{
callsFooVal=0;
}
};
1>e:\程序\c++\tbar_foo\tbar_foo\Bar_Foo.h(20) : error C2059: 语法错误 : “常量”
不知道错哪里了 哪位高手指点一下