Hey everyone! I was wondering if you had a struct...
Code:
struct Map
{
int MyArray[24][40];
int Enemies[64];
}
...and if i pass this array by value...
Code:
int ManipStructWArray( Map MyMap )
{
int num = MyMap.MyArray[12][33];
return 0;
}
...is this legal? How about by reference?...
Code:
int ManipTheStruct( Map &MyMap )
{
int num = MyMap.MyArray[9][3];
return num;
}
I need to know this because I have a test on structs and vectors on Saturday, and the only compilers I have access to are at the school... preferably passing by reference would be nice. Is what I did in that code legal?