// A struct is what we had before the class was invented. // // structs are still useful for holding unadorned data. // // A struct has no methods, just data members. Everything’s public. // (Both of those statements are actually false, but let’s pretend.) #include using namespace std; struct Point { int x, y; }; int main() { Point p; // Note lack of new cout << p.x << ',' << p.y << '\n'; // uninitialized values p.x = 8; p.y = 9; cout << p.x << ',' << p.y << '\n'; // cout << p << '\n'; // Will not compile return 0; }