int main()
{
std::string SPEACH;
std::string WOrt;
std::string KUNDE;
std::string KUNDEN;
std::string WORDS;
std::string ENTRE;
std::string DEFINITION;
std::string ALLES;
std::string NOMEN;
{
cout << "\n Whats your name? \n";
set<string> KUNDE;
{ ifstream in("Kunden.h");
for(string wort; in >> wort;)
KUNDE.insert(wort);
}
{ for(string wort; cin >> wort;)
if (KUNDE.count(wort))
goto NEXT4;
else
goto NEXT4;
}
}
{NEXT4:
cout << "I don't know you. Where do you life? \n";
fstream datei6;
datei6.open("speach.h", ios::app);
cin >>SPEACH;
{ set<string> namen;
{ cout << "Gib deinen Namen ein";
ifstream in("Kunden.h");
for(string wort; in >> wort;)
namen.insert(wort);
}
{ for(string wort; cin >> wort;)
if (namen.count(wort))
goto NEXT2;
else
{ cout << "I don't know the wort " << wort << " Is it a Nomen or a Name?";
cin >> WORDS;
{fstream datei1;
fstream datei2;
if (WORDS == "Nomen")
{ { datei1.open("Nomen1.h", ios::app);
datei2.open("Nomen2.h", ios::app);
{ cout << "Wie lautet der Singular?" << endl;
cin >> ENTRE;
datei1 <<"\n" << ENTRE << endl; }
}
{ cout << "Bitte definieren Sie den Begriff mit einem Wort" << endl;
cin >> DEFINITION;
datei2 << DEFINITION << endl; }
}
else if (WORDS == "Name")
{ datei1.open("Name.h1", ios::app);
{ cout << "Wer ist das?" << endl;
cin >> ENTRE;
datei1 <<"\n" << ENTRE << "\n " << endl; } }
datei1 << ENTRE << endl;
datei2 << ENTRE << endl;
} } } }
{ NEXT2:
cout << "."; }} }
I can save definitions or names, but I can't access DEFINITION or NAMEN/Nomen! What I want:
Entre a word, it checks if it's still there.
If not, it will save the word and it's definition.
I need:
If I entre a word, the PC must entre me the other word back.
Thanks
Last edited by derdude007; March 7th, 2012 at 01:56 PM.
Use code tags and fix the indentation. I wouldn't want to even begin to figure out what's going on in there. Never do things like
} } } }
on the same line.
I just made }}} because I won't need a lot of place!
But what do you mean with "Use code tags and fix the indentation."?
A bit accurate pleas, I'm new! Thanks your help
What do you mean? Could you show it me?
Sincerley
BUT what I want:
Entre a word, it checks if it's still there.
If not, it will save the word and it's definition.
I need:
If I entre a word, the PC must entre me the other word back.
???????????????
Bookmarks