Kann mir jemand helfen?



  • Ich habe nun diesen Quelltext verfasst und möchte wissen, ob er richtig ist.
    Und Ich möchte noch hinzufügen, dass 'void main (void)' ein C++ Bestandteil ist und dass er richtig und NICHT falsch ist. Wenn ihr nicht glaubt dann probiert es selbst, denn bei mir klappte das immer.

    [cpp]
    //-----------------------------------------------------------------------------
    #include <iostream.h>
    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    string Antwort;
    //-----------------------------------------------------------------------------
    void main (void)
    {
    cin >> Antwort;
    cout << "Bist du homosexuell? Yes/No" <<endl;
    getch ();
    if (Antwort == "yes")
    {
    cout << "Falsche Antwort Kleiner!" <<endl;
    getch ();
    }

    if (Antwort == "no")
    {
    cout << "Das ist gut, denn wenn anders... he he he." <<endl;
    getch ();
    }
    }
    //-----------------------------------------------------------------------------



  • LOL 🙄
    Nein dir kann man nicht helfen.



  • Hallo

    Auch wenn du es nicht glauben willst:

    void main zu int main
    iostream.h zu iostream
    ...

    Außerdem liest du erst ein, bevor du etwas fragst.

    chrische


Anmelden zum Antworten