📜  c++ 将对象添加到数组 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:52.408000             🧑  作者: Mango

代码示例1
int main()
{
    Student st[5];
    for( int i=0; i<5; i++ )
    {
        cout << "Student " << i + 1 << endl;
        cout << "Enter name" << endl;
        st[i].getName();
        cout << "Enter marks" << endl;
        st[i].getMarks();
    }