类型初始化 / 集合

#include <iostream>
using namespace std;

class Employee {
    public:
    string FirstName;
    string LastName;

    Employee(string firstName, string lastName)
    {
        FirstName = firstName;
        LastName = lastName;
    }
};

//Array of integer
int primeNumbers[] = { 235711131719 };

//Array of string
string gameList[] { "soccer""hockey""basketball" };

//Array of Employee class (another way)
Employee employees[] {
    Employee("Anton""Pavlov"),
    Employee("Elena""Kirienko")
};

cout << primeNumbers[2] << endl;
cout << gameList[1] << endl;
cout << employees[0].LastName;