// struct1.c
// Intro to structures

#include <iostream>
#include <string>

using namespace std;

//define the student_t structure type
struct student_t
{
	string first_name;
	string last_name;
	int year;
	double gpa;
};  // Do NOT forget a semicolon here!!!!!

int main()
{
	// declare student as student_t structure
	student_t student;
	
	// access the subcomponents of a student_t datatype
	// by variableName.componenet
	student.first_name = "Michael";
	student.last_name = "Haggerty";
	student.year = 17;
	student.gpa = 3.93;
   
   cout << "Student " << student.first_name << " " << student.last_name
        << " is a " << student.year << " year student with a GPA of " 
        << student.gpa << endl;
	
	return 0;
}