Hello,
Is there a way I can use the solution of an integer variable to access an element of the array with strings and print that element in the output?
I have searched through the documentation, however, I could only see obtaining the value of a variable as a string with show(), but then I can not use it as an index in the array.
So in the output, I want to do something like this:
% Instance data
array[_] of string: Names
var int: selectedName;
output["Selected name" + Names[ obtain_solution_of_as_int(selectedName) ]...
However, this does not work, as it does not permit to have a variable as an index of an array of strings, but I want to index the array with the solution of selectedName.
Thank you for considering my message!
Nevena