Can not re-declare the function outside the class member functions

Development environment VS2017
code is as follows:

CBrick* CTetrisGame::createNewBrick(int &brickindex); //随机创建砖块,同时返回当前的砖块索引  
{





}

Given as follows:

错误(活动)  E0392   不能在成员函数 "CTetrisGame::createNewBrick" 的类外部重新声明该函数   Tetris_Game E:\Essential 

Found through the search, .cpp file in the last semicolon function name is not removed

CBrick* CTetrisGame::createNewBrick(int &brickindex) //随机创建砖块,同时返回当前的砖块索引  //这里多加了分号
{





}

Guess you like

Origin www.cnblogs.com/Manual-Linux/p/11008163.html