如何让程序输出结构体或者类的变量名?
如何让程序输出结构体或者类的变量名?
比如:
typedef struct MY_TEST
{
int nType;
char typeName[256];
}MY_TEST, *LPMY_TEST;
在程序中如何写代码可以实现程序自动输出结构体的变量名。
函数:
OutputMyStrunt(MY_TEST);
希望输出结果
output:
int nType;
char typeName[256];
这样,我在增加变量时,重新编译一下程序就可以了,而无需修改输出代码。
typedef struct MY_TEST
{
int nType;
char typeName[256];
int newType;
}MY_TEST, *LPMY_TEST;
可以用什么宏实现?就像VC中的自动提示一样。