I want to convert string constant to preprocessing token using macro. Example:
// get the first character of marco argument to postfix of new data type.
#define TYPE(typename) Prefix ## typename #typename[0]
void main()
{
TYPE(int) a, b, c; // Prefixinti a, b, c;
TYPE(float) x, y, z; // Prefixfloatf x, y, z;
a = 3;
}
is it possible in C/C++?
p/s: sorry for my poor English.
edited