I used a pointer so I could try playing with the void :3 If I need to if/else then:
Code:
#define PrintVar(varName, type) printf("%s vale ", #varName);\
if (type == "f") printf("%f\n", varName);\
else if (type == "d") printf("%d\n", varName);\
else if (type == "c") printf("%c\n", varName);\
else if (type == "s") printf("%s\n", varName);\
else if (type == "l") printf("%llu", varName);
,also forgot to say I'm on pure C, not C++.
On C++ it's a way easier:
Code:
#define PrintVar(varName) cout << #varName << " vale " << varName << endl;
Thanks for the help anyways.
Still open to suggestions.