Danlos Danlos - 1 year ago 111
C++ Question

pointer array in c++

i've got a Problem with an Array of pointers.

struct sFace {
sPoint* points[2];
sCell* neighCells[2];
sFace* neighFaces[4];

double* neighPe[4];
double* neighF[4];}

struct sCell {
sFace* faces[4];
sPoint* points[4];
sCell* neighCells[4];

curFace = &data->faces[faceId];
curCell = &data->cells[cellId];

why i must not use the &-operator in:

curFace->neighFaces[1]&= curFace->neighCells[1]->faces[1];

Answer Source

The &= is a bitwsie assignment operator according to this.

Read enter link description here if you are new programming in C++.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download