分类: WINDOWS
2009-11-06 09:40:50
#include "stdio.h"
template
class A
{
public:
static int i;
};
template
int A
void main()
{
A
A
A
A
A
A
A
A
printf("A1::i[0x%x], Value[0x%x]\n", &(A
printf("A2::i[0x%x], Value[0x%x]\n", &(A
printf("A3::i[0x%x], Value[0x%x]\n", &(A
printf("A4::i[0x%x], Value[0x%x]\n", &(A
}
输出:
A1::i[0x417060], Value[0x10]
A2::i[0x41704c], Value[0x20]
A3::i[0x417034], Value[0x30]
A4::i[0x417030], Value[0x40]