Example |
Description |
aray += 3; |
Adds three to every element of
the array |
aray *= 0; |
Multiplies every element of the
array with a zero. |
arayA = arayB; |
Copies the data from arayB into
arayA. HAS NO MEMORY LEAKS! |
aray.sort(); |
Changes the aray so that the
data is now in sorted order. For example the array (3,1,-4,2)
becomes (-4,1,2,3). |
cout << "Hi" << aray
<< "\n"; |
Prints the array in some nice
fashion. |
if (aray.has(12)) cout << "has a twelve\n"; else cout << "No twelve in here\n"; |
Returns a 'true' if the array
has the given argument as an element, otherwise false. |
if (arayA == arayB) cout << "They are equal\n"; |
Returns true if the arayA has
the same elements in the same order as arayB. |