Vector Implementation Basics

Example Using a Simple “Vector” Class

Take a look at the simple_vector.cpp file.

Name Type Value
y float (empty)
x int 5
p int * address
g int * p+1

What is *g?

Implementation in IVector.h

See IVector.h

Templates

Test Program

See test_program.cpp

See simple_vector2.cpp

TVector is a templated version of IVector

See TVector.h

See Vector.h

See TestVector.cpp