i'm making this spanish conjugator for class.
and i cant seem to get how to make multiple letter variables.
can anyone tell my what i'm doing wrong?
it's kinda urgent.

here is the code so far.

#include <iostream>
using namespace std;

int main () {


    char verb;
    cout << "Enter the base of the verb you would like to conjugate" <<endl;
    cin >> verb;
    cout << "Thank you" <<endl;

    char gruppe;
    cout << "is it an ir, er or ar verb?" <<endl;
    cin >> gruppe;
    cout << "Thank you" <<endl;

    char pronomen;
    cout << "now who does it (yo, tú, él, ella, usted, nosotros, vosotros, ellos, ustedes" <<endl;
    cin >> pronomen;
    cout << "thank you" <<endl;

    if (gruppe == 'ir'){
        if (pronomen == 'yo'){
            cout << verb << "o" <<endl;
        }
        if (pronomen == 'tú'){
            cout << verb << "es" <<endl;
        }
        if (pronomen == 'él'){
            cout << verb << "imos" <<endl;
        }
        if (pronomen == 'ella'){
            cout << verb << "imos" <<endl;
        }
        if (pronomen == 'usted'){
            cout << verb << "imos" <<endl;
        }
        if (pronomen == 'nosotros'){
            cout << verb << "ís" <<endl;
        }
        if (pronomen == 'vosotros')
            cout << verb << "en" <<endl;
    }
}

1) Please wrap your code in code tags
2) Use std::string instead of char (you'll have to #include <string>) and everything should turn out much better for you :)

Dave

its you choice:string or char arrays....but using string is mostly better unless you are checking to make sure the person entered only a specific number of characters like only 2 chars rather than 3....but just go with strings and you should be fine

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.