home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_10
/
1010066a
< prev
next >
Wrap
Text File
|
1992-08-11
|
680b
|
33 lines
struct s_date
{
int month;
int day;
int year;
};
int function_requiring_pointer_to_date(struct s_date * p_date);
int function_requiring_reference_to_date(struct s_date & date);
void calling_function()
{
struct s_date my_date;
function_requiring_pointer_to_date(&my_date);
function_requiring_reference_to_date(my_date);
...
};
int function_requiring_pointer_to_date(struct s_date *p_date)
{
int month;
month = p_date->month;
....
}
int function_requiring_reference_to_date(struct s_date & date)
{
int month;
month = date.month;
...
}