世界银行集团的作用:TC里面运行这段程序的时候出现这样的问题,谁能告诉我怎么解决

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/27 19:20:54
#include "guesst.h"
#include "conio.h"

void main()
{
int i,j,a,b,times=1;
int ifend=1;
int go=1;
char ch;
ifstream in("data.txt");
guesst *tree,*point;
tree=new guesst();
tree->load(in); point=tree;

while(go){ ifend=1;
for(i=0;i<5;i++)
for(j=0;j<5;j++)
if(point->next[i][j])
ifend=0;

if(ifend){ cout<<"Times:"<<times;
cout<<"\nThe answer is: "; for(i=0;i<4;i++)
cout<<point->num[i];
cout<<"\nPress any key to continue,Esc to exit"<<endl;
ch=getch();
if(ch==27)
go=0;
else{
point=tree;
times=1;
}
}
else{ cout<<"Times:"<<times++;
cout<<"\nI guess: ";
for(i=0;i<4;i++)
cout<<point->num[i];
cout<<"\nYour answer:\n";
cout<<"A: ";
cin>>a;
cout<<"B: ";
cin>>b;
if(!point->next[a][b]){ // if(a==4) cout<<"\n*****Success!*****\n";
else cout<<"\n*****You must be wrong!*****\n";
cout<<"Press any key to continue,Esc to exit"<<endl; ch=getch();
if(ch==27)
go=0;
else{
point=tree;
times=1;
}
}
else point=point->next[a][b];
}
}

}

提示:

'ios::ios(ios &)' is not accessible
Compiler could not generate copy constructor for class 'fstreambase'
Compiler could not generate copy constructor for class 'istream'
是TC3.0,是C++的程序.

你的TC是3。0还是2。0啊?,这个是C++的no C