#include #include #include using namespace std; //We are creating a new // "super" type of variable //made up of many other types //of variables class student { public: string fname; string lname; int id; double exam1; double exam2; double exam3; //if you want to set some default values.. //use a "constructor" student() { fname = "jonda"; exam2 = 0; exam3 = -99; } }; int main() { int x = 4; char c = 'm'; string s = "hello world!"; bool b = true; double z = 3.145735789; float y = 7.837; //Can check the number of bytes used by any variable type cout << sizeof(x) << endl; cout << sizeof(c) << endl; cout << sizeof(s) << endl; cout << sizeof(b) << endl; cout << sizeof(z) << endl; cout << sizeof(y) << endl; //super variables student s1; student s2; //Should be at least the size of all the little variables its made of cout << sizeof(s1) << endl; //can set any of the student variables s1.fname = "Robbie"; s1.exam1 = 84.3; s1.exam2 = 70; s1.exam3 = 95.3; cout << "This student's name is " << s1.fname << " with exam2 scores of " << s1.exam2 << endl; cout << "This student's name is " << s2.fname << " with exam2 scores of " << s2.exam2 << endl; return 0; }