class qkecheng:public xinxi//缺課課程類
{
public:
qkecheng(){kcshu++;}
~qkecheng(){kcshu--;}
int getrc(xinxi st1[],int n,int j);
char qkn[20];//公有資料成員
private:
int renci;
static int kcshu;//靜態資料成員
};
int qkecheng::kcshu=0;
int qkecheng::getrc(xinxi st1[],int n,int j)
{
renci=0;
renci++;
for(int i=0;i<n;i++)
if(*(st1[i+1].gettime()+1==*(st1[j].gettime()+1)&&*(st1[i+1].gettime()+2)==*(st1[j].gettime()+2))
if(strcmp(qkn,st1[i].getkecheng())==0)
renci++;
return renci;
}
報錯:[Error] ISO C++ forbids comparison between pointer and integer [-fpermissive]
[Error] invalid type argument of unary '*' (have 'bool')
uj5u.com熱心網友回復:
對bool型別解參考,你要干嗎?
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/32502.html
標籤:C++ 語言
上一篇:求助大佬
下一篇:大家都用什么軟體寫c++
