In my class we didn't get to cover this and it was the next thing we were going to do! So how do I declare and use arrays?
Printable View
In my class we didn't get to cover this and it was the next thing we were going to do! So how do I declare and use arrays?
Two ways:
orCode:int MyArray[10];
// I can go from MyArray[0] to MyArray[9]
// An access violation exception will occur if you try to
// use MyArray[10];
The second way, you can use variable names and anything else to make the array size.Code:int* MyArray;
int MyNum = 50;
MyArray = new int[MyNum + 3];
cool, thanks parksie :)