0
int a[5]= { 1, 2, 3 ,4 , 5};

char letter;

cin >> letter;

If I input a, which is the name of my array, is it possible to retrieve a value from array a by using letter as the array name instead of a. Ex: letter[0] = 1.

donutbomb
  • 5
  • 2

1 Answers1

0

No, it is not supported by design. If you are keen to go ahead, you might consider to use a std::map.

peval27
  • 1,239
  • 2
  • 14
  • 40