home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ for Dummies (3rd Edition)
/
C_FD.iso
/
CHAP09
/
CHAP09_1.CPP
next >
Wrap
C/C++ Source or Header
|
1996-09-15
|
476b
|
16 lines
// Chap09_1.cpp to build this program properly you must
// include Student.cpp in your project
#include "student.h"
Student s;
int main()
{
//raise my grade (donÆt make it too high; otherwise, no
//one would believe it
s.gpa = 3.5; //<- generates compiler error
float gpa = s.grade(); //<- this public function reads
//a copy of the value, but you canÆt
//change it from here
return 0;
}