Structures (records)

#include <iostream>
using namespace std;

struct Alphabet {
    //without range check
    char operator [] (int i) {
        return 64 + i;
    }
};

Alphabet alphabet;
char charA = alphabet[1];
//charA is "A"

char charE = alphabet[5];
//charE is "E"

cout << "charA: " << charA << endl;
cout << "charE: " << charE;