我有一些char变量,它们被命名为tb11,tb12,tb13,tb14,tb21,tb22,tb23,tb24,tb31 ....我想用for循环迭代更改变量名中的数字部分
for(int i = 1; i<=6 ; i++)
{
for(int j = 1; j<=4 ; j++)
{
tb(i)(j).readText; //this is my problem
}
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能像这样在for循环中更改变量名?
c++ ×1