CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Thread: Help definition

Threaded View

  1. #1
    Join Date
    Mar 2012
    Posts
    4

    Wink Help definition

    Code:
    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 02:56 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured