Basically I am wondering how its possible to pass an array through a function so that its values can be changed via another function without using global variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
void mainArray();
int main()
{
while(condition = true)
{
mainArray();
editArray(); //This is a function that I would want to use to edit mainArray()
}
}
void mainArray()
{
char myArray[3][3] = { { '20','15','26' } ,{ '31','32','50' } ,{ '16','27','86' }};
cout << myArray[blah][blah];
}
I want to able to use editArray to change the data in myArray and then have the screen refreshed with the updated data.