Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > DynArray
diff DynArray.h @ 3:8473c52c6f0e
Changed name from Vector to DynArray
| author | Me |
|---|---|
| date | Sun, 12 Sep 2010 12:10:25 -0700 |
| parents | |
| children | f35e64d7a42b |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/DynArray.h Sun Sep 12 12:10:25 2010 -0700 1.3 @@ -0,0 +1,27 @@ 1.4 +/* 1.5 + * File: Vector.h 1.6 + * Author: Me 1.7 + * 1.8 + * Created on May 14, 2010, 3:08 PM 1.9 + */ 1.10 + 1.11 +#ifndef _VECTOR_H 1.12 +#define _VECTOR_H 1.13 + 1.14 +//Doing one special cheat -- hiding a back-ptr in front of array 1.15 +typedef struct 1.16 + { 1.17 + void **arrayOfPtrs; 1.18 + int numPtrsInArray; 1.19 + int sizeOfArray; 1.20 + } 1.21 +Vector; 1.22 + 1.23 +Vector *createVect ( int32 initialSizeOfArray ); 1.24 +Vector *increaseSizeOfVect( Vector *vect ); 1.25 +bool8 addToVect ( void *ptrToAdd, Vector *vect ); 1.26 +bool8 removeLastInVect ( Vector *vect ); 1.27 + 1.28 + 1.29 +#endif /* _VECTOR_H */ 1.30 +
