……

c++里必须得赋值给某个变量,然后才可cout变量;不能直接 cout<<(f(i)==1)?"能赢":"不能赢";

必须

string s=(f(i)==1)?"能赢":"不能赢";

cout<<i<<':'<<s<<endl;

我也不知道为什么

posted on 2018-03-19 12:19  兔子子子  阅读(106)  评论(0编辑  收藏  举报