home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_11_01
/
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];
}