Declare variables of a type indicated by a pointer

I have:

const char  *ptr = "int";

If I have to declare using ptr:

int a;

ptr can point to anything arbitrary char, string, <anythihg>.
I have to delcare a variable of that type what ptr is pointing at.
Is it possible?


Source: c#

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.