**显示器工作不正常,在主内部实施时不会正确显示板子。C++ NIM游戏逻辑错误
这是为NIM游戏< < 得主功能和显示功能更新的代码不能正常工作** 我需要帮助搞清楚如何让显示功能正常工作,请。
class cboard{
private:
int sticks;
bool player;
public:
//default constructor
cboard(){sticks=10;}
//constructor with parameter given
cboard(int x){sticks=x;}
//stick set
void setstick(int m){sticks-=m;}
//display stick getter
int get_sticks(){return sticks;}
//display function, a.k.a baord getter
void displaycboard()
{for (int i=sticks; i>0; i--)
{cout<<"| ";}
cout<<endl;}
};
'goto坏;'哦讽刺... – user657267
的意思是显示多功能lmao – user3717385
所以你的问题是你不能有一个以上的答案对同一个问题,但我会看看,并在我的答案的底部添加额外的点 – chrisb2244