Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个函数指针向量。
class GameState : public AppState{ private: void level1(); std::vector<void (*)()> levelFunctions; };
我如何将东西推入这个向量?我努力了
void GameState::level1(){ levelFunctions.push_back(&GameState::level1); }
和其他人,但我每次都会遇到编译错误。