33 void VectorInt::alloc(
int _n,
int _ext)
40 if (_ext==0) {
d->
p=NULL;
return; };
42 d->
p=(
int*)malloc(_ext*
sizeof(
int));
43 if ((
d->
p)==NULL) { printf(
"memory allocation error\n"); exit(253); }
61 if (_d) memcpy(
d->
p,_d,_n*
sizeof(
int));
69 d->
p=(
int*)realloc(
d->
p,new_extention*
sizeof(
int));
123 memcpy(
d->
p,r.
d->
p,n*
sizeof(
double));
143 d->
p=(
int*)realloc(
d->
p,
d->
n*
sizeof(
int));
150 if (
d->
n != Q.
d->
n)
return 0;
152 int *cP =
d->
p, *cQ = Q.
d->
p;
157 if (*cP!=*cQ)
return 0;
168 if (!
d->
n || !
d->
p) { printf(
"]\n");
return; }
171 while (--N) printf(
"%i,",*(up++));
void destroyCurrentBuffer()
int equals(const VectorInt &Q)
struct VectorInt::VectorIntDataTag VectorIntData
void copyFrom(VectorInt r)
void prepareExtend(int new_extention)
VectorInt & operator=(const VectorInt &P)
static VectorInt emptyVectorInt