home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ for Dummies (3rd Edition)
/
C_FD.iso
/
CHAP08
/
CHAP08_2.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-09-15
|
395b
|
20 lines
// Chap08_2.c to build this program properly you must
// include Student.cpp in your project
#include "Student.h"
//same as before, but this time using references
void someFn(Student &refS)
{
refS.semesterHours = 10;
refS.gpa = 3.0;
refS.addCourse(3, 4.0); //call the member function
}
Student s;
int main()
{
someFn(s);
return 0;
}