If I create an array in a function, I can do this:
int main();
{
int ConstantArray[3] = { 01, 02, 03};
cout << ConstantArray[1]
return 0;
}
and it should print "02" to the screen, right?
It seems that it is easy enough print the value within the same function but how do I get that info when I am trying to use it in a different function?
This is what I tried:
int GetValue();
{
cout << ConstantArray[1] << endl;
return 0;
}
Now how do I get the values from ConstantArray in the function GetValue?
I've read tutorials but the info is just not clicking.