然而,我真的很不擅长C++,并且一直在寻找解决方案,但都无济于事。如果能帮上忙我会很感激的。() name = new char[20];void Cow::sleep() cout << "Cow: sleeps when not eating" << endl;是C文件正如你所看到的,非常简单的东西,但是,每当我尝试编译的时候,我都会得到:“错误:‘name’没有在这个作用域中声明”。
如果我注释掉setName方法,它就会编译。
所以我下载了这个国际象棋引擎:其中,在包括bitboard.h、hash.h和pawnhash.h在内的多个文件中有很多“X未在此作用域中声明\src\bitboard.h:85: error: ISO C++ forbids declaration of `bb' with no type
..\src\bitboard.h:103: error: ISO C++ forbids declaratio