how to call the array like this example?
I have some arrays of words like this
1 2 3
|
char array1[][] = {"???","???"...}
char array2[][] = {"???","???"...}
char array3[][] = {"???","???"...}
|
And i have
1 2
|
char NameArry[10];
cin >> NameArry;
|
array1 <<=== i typed the name of that array
i do not want to use if or anything i just want to pass the name of that array then print out the word??
cout << [tha name i put???][][];
The C++ language is not reflective, so you cannot use a variable to refer to an identifier name.
Topic archived. No new replies allowed.