arrays

const int = 4;
int oldValues[SIZE] = {10, 100, 200, 300};
int newValues[SIZE];

newValues=oldValues // iknow this is wrong !

//but, can i change to this statement can?
//will the contents of the oldValues equal to the newValues?

oldValues[SIZE]=newValues[SIZE];

Array name without []s is a constant pointer to that array. You can't copy things by assigning pointers. Array name with [x] returns the xth element of that array. You only copy one element with your last line (an invalid one too).
To copy an array you need to use memcpy, std::copy or simply a for loop.
Topic archived. No new replies allowed.