Как я могу создать массив структур внутри которой будут массивы других структур?
Например: есть class students
, мне нужна новая stuct theclass внутри которой будет одним из параметров передоваться массив с учениками. Те структура theclass у него есть буква и массив со студентами.
Или как можно по-другому реализовать?
(скорее всего я максимально непонятно изложил идею, все равно спасибо)
'
#include <iostream>
#include <string>
using namespace std;
class Human
{
public:
string name;
string surname;
char sex;
int day;
int month;
int year;
Human(string name, string surname, char sex, int day, int month, int year )
{
this -> name = name;
this -> surname = surname;
this -> sex = sex;
this -> day = day;
this -> month = month;
this -> year = year;
};
};
class Student: public Human
{
public:
string grade;
Student (string name, string surname, char sex, int day, int month, int year, string grade) : Human(name, surname, sex, day, month, year)
{
this -> grade = grade;
};
};
struct TheClass
{
Student students[10];
TheClass (Student students[10])
{
this-> Student students[10]= students[10];
};
};
'