E
E
Eugene2014-03-11 21:04:29
C++ / C#
Eugene, 2014-03-11 21:04:29

What does this line do in C++ classes?

There is a class describing a group of students

class Student
{
    char name[50];
    char fam[50];
    int age;
    char specializ[50];
public:
    void Show()
    {
            cout<<"Фамилия: "<<fam<<endl;
            cout<<"Имя: "<<name<<endl;
            cout<<"Специализация: "<<specializ<<endl;
            cout<<"Возраст: "<<age<<endl;
    }
    void Inpfam()
    {
        cout<<"Введите фамилию студента: \n";
        gets(fam);
        OemToCharA(fam,fam);
    }
    void Inpname()
    {
        cout<<"Введите имя студента: \n";
        gets(name);
        OemToCharA(name,name);
    }
    void Inpage()
    {
        cout<<"Введите возраст: \n";
        cin>>age;
        cin.ignore(1);
    }
    void Inpspecializ()
    {
        cout<<"Введите специализацию: \n";
        gets(specializ);
        OemToCharA(specializ,specializ);
    }
    
};

In the main function, an object of the class is created.
Student obj[100];
Please explain what this line does: obj[100]; ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Starkov, 2014-03-11
@Jek_Rock

Creates an array of class objects :-)

H
hantalapai, 2014-03-11
@hantalapai

What does the OemToCharA() function do?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question