home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
c
/
cuj9301.zip
/
1101095A
< prev
next >
Wrap
Text File
|
1992-11-03
|
419b
|
21 lines
// fa3.cpp - a dynamic array of float with operator[]
// as both const and non-const member functions
#include "fa3.h"
#include <assert.h>
// other float_array member function definitions ...
const float &float_array::operator[](size_t i) const
{
assert(i < len);
return array[i];
}
float &float_array::operator[](size_t i)
{
assert(i < len);
return array[i];
}