#include "stdafx.h"
#include
using namespace std;
int main()
{
//creating the structure
typedef struct {
char firstInitial;
char middleInitial;
char lastInitial;
int employeeNumber;
int salary;
} EmployeeT;
//Creating and Populating an Employee
//Employee Declaration
EmployeeT anEmployee;
//Building and Defining the Employee
anEmployee.firstInitial = 'M';
anEmployee.middleInitial = 'R';
anEmployee.lastInitial = 'G';
anEmployee.employeeNumber = 42;
anEmployee.salary = 317000;
//Output the values of an employee, in other words, assigns the values
//Prints the values to the screen
cout << "Employee: " <<>
Wednesday, August 27, 2008
Structures
Just messing around with structures, got this example from a book.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment