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(zeile1,255,'\t')){
strcpy(tmp1,zeile1);
in.getline(zeile1,255,'\n');
strcpy(tmp3,zeile3);
double merke=in.tellg();
in.seekg(0);
while ( in.getline(zeile,255,'\t')){
strcpy(tmp,zeile);
//read letter order
in.getline(zeile2,255,'\n');
strcpy(tmp2,zeile);
if ((tmp==tmp1)&&(strcmp(tmp2,tmp5)!=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