Access to array by string of its name

I have an array called abee1.

int abee1[4][3];

I have done some string function (like: "abee" + "1" ) and have "abee1" as string which is the same as abee1. How can I copy the data of abee1 into another array with same size, for example abeeTwo[4][3], using only the name of abbe1 as string ("abee1") not by abee1 directly.

Thank you in advance
Please don't spam the forum with the same question in multiple threads.

As I've just posted in one of your other threads, you can't do this in C++. It is not a reflexive language.
Last edited on
I do not spam. Do you know the alternative way to solve my problem?
Last edited on
I do not spam.

You've posted three different threads in rapid succession in this forum, asking the same question. Guilty as charged, and believe me, people will start reporting you if you continue to do it.

In this case, a multidimensional array might serve your purpose.
mosahab wrote:
I do not spam

Well you have at least 4 posts about the same thing, that is what MikeyBoy meant. It is annoying for those who put effort in to reply.

Normally, instead of variables a1, a2, a3 etc. One would have an array, or any other container that has the [] operator, or at() function. So you can refer to them as a[1], a[2] etc

Despite that your variables are already 2d arrays, there is nothing stopping you from putting them into one of the containers mentioned. That is one of the great things about the STL, one can have containers filled with objects of any type.

Have a look in the reference section, top left of this page.

I have just noticed that others have already said the exact same thing - which is why spamming is annoying. You have ignored the advice given & continued to create new topics

Edit: And this should be in the beginners section, not the general section.
Last edited on
Topic archived. No new replies allowed.