My problem is creating a function or storing them in a function but calling upon those arrays to bring into main. So I created the function and started off with my smallest array to see if I can get it to work first before bringing anything else over. Sadly it did not work I brought array and its contents over to the function and tried to call up that specific array and bring into the main. Here is what I did in pictures. The code I have below is just to show I created the function stored one of my smaller arrays in it and tried but failed to call upon it in the main. The program I felt was too big to put the whole thing in.
1 2 3 4 5 6 7 8 9
void instructions();
void InitializeVars();
void HeroInventory();
void PlayGame();
int main()
1 2 3 4 5 6 7 8 9 10
void InitializeVars()
{
string WrongChoice[1];
WrongChoice[0] = "Sorry that is not a valid input please chose 1 or 2: ";
}
I really rather not switch everything to vectors. But just in case how would I call the vector out of a function and into the main I still don't really get how to do that.