Hello,
many thanks for all good tipps up to now.
It's read a textfile in this structure:
opst post
opst stop
aagin again
enw new
and so on.
int main(){
ifstream in("test.txt") ;
char zeile[256];char zeile1[256];char zeile2[256];
char tmp[256] = "";char tmp1[256]= "";char tmp2[256]= "";
char tmp3[256]= "";
in.seekg(0);
while ( in.getline(zeil e1,255,'\t')){
strcpy(tmp1,zei le1);
in.getline(zeil e1,255,'\n');
strcpy(tmp3,zei le3);
double merke=in.tellg( );
in.seekg(0);
while ( in.getline(zeil e,255,'\t')){
strcpy(tmp,zeil e);
//read letter order
in.getline(zeil e2,255,'\n');
strcpy(tmp2,zei le);
if ((tmp==tmp1)&&( strcmp(tmp2,tmp 5)!=0)){
cout << zeile2 << endl;
}
}
in.clear();
in.seekg(merke) ;
}
return 0;
}
How can I prevent that double existing words will be shown.
Many thanks for reply
many thanks for all good tipps up to now.
It's read a textfile in this structure:
opst post
opst stop
aagin again
enw new
and so on.
int main(){
ifstream in("test.txt") ;
char zeile[256];char zeile1[256];char zeile2[256];
char tmp[256] = "";char tmp1[256]= "";char tmp2[256]= "";
char tmp3[256]= "";
in.seekg(0);
while ( in.getline(zeil e1,255,'\t')){
strcpy(tmp1,zei le1);
in.getline(zeil e1,255,'\n');
strcpy(tmp3,zei le3);
double merke=in.tellg( );
in.seekg(0);
while ( in.getline(zeil e,255,'\t')){
strcpy(tmp,zeil e);
//read letter order
in.getline(zeil e2,255,'\n');
strcpy(tmp2,zei le);
if ((tmp==tmp1)&&( strcmp(tmp2,tmp 5)!=0)){
cout << zeile2 << endl;
}
}
in.clear();
in.seekg(merke) ;
}
return 0;
}
How can I prevent that double existing words will be shown.
Many thanks for reply
Comment