How can I write to use two nested variables at once, like an array? I am trying to make a number of variables specified by the user (array indexes from 1
up to that number) and their names are also specified by the user (array name), but when I do this nothing is returned. Can anyone help me please?
echo how many people?
set /p number=
echo.
echo.
for /l %%a in (1,1,%number%) do (
echo name of %%a person
set /p s%%a =
echo.
echo.
echo.
if %%a==%number% (
echo names are
pause
for /l %%n in (1,1,%number%) do (
echo name %%n is %s%%a%
)
)
)