#include class myClass // How to define a "class" type { // This is NOT a variable definition public: int x; // It serves to tell C++ what "myClass" looks like float y; }; int main(int argc, char *argv[]) { myClass a; // How to define class variables myClass b[4]; // How to define arrays of class variables myClass *p; a.x = 1234; // How to use a struct variable a.y = 3.14; p = &b[2]; (*p).x = 12; p->y = 34; cout << "a = " << a.x << " " << a.y << endl; cout << "b[2] = " << b[2].x << " " << b[2].y << endl; }