PersonRecordV1 Struct Reference

#include <person-record.h>

List of all members.

Public Attributes

char * name
int id
char * address
int age


Detailed Description

PersonRecord Version 1 has name, id, address, and age fields. The name and address are char*, the id and age int.

Consider the following code segment:

     PersonRecordV1 prv1;
     prv1.name = "Jane Doe";
     prv1.id = 123456789;
     prv1.address = "1 Main St."
     prv1.age = 25;
                                                                      
Here is a picture of the memory layout of variable prv1:

prv1.jpg

Consider now the following code segment, which dynamically allocates a value of type PersonRecordV1:

     PersonRecordV1 prv1p = new(PersonRecordV1);
     prv1p->name = "Jane Doe";
     prv1p->id = 123456789;
     prv1p->address = "1 Main St."
     prv1p->age = 25;
                                                                      
Here is a picture of the memory layout of variable prv1p:

prv1p.jpg


Member Data Documentation

char* PersonRecordV1::address
 

address is a variable-length string

int PersonRecordV1::age
 

age is an int

int PersonRecordV1::id
 

id is an int

char* PersonRecordV1::name
 

name is a variable-length string


The documentation for this struct was generated from the following file:
Generated on Fri Apr 20 09:49:47 2007 by  doxygen 1.4.6