以下问题让我发疯,尽管它看起来并不奇怪:
class Foo;
// This is the location of the first error code
// ↓
int (Foo::*)(int) getPointer()
{
return 0;
}
海湾合作委员会给了我:
error: expected unqualified-id before ')' token
error: expected initializer before 'getPointer'
PS:我用 -std=c++11 编译