c - __COUNTER__ with global scope -
if use __counter__
in 2 different source files, value reset zero. possible make __counter__
scope global?
file: file1.c
int x=__counter__; int y=__counter__;
file: file2.c
int a=__counter__; int b=__counter__;
i have x, y, & b have unique initialized values. in case, x=a, y=b.
i tried placing __counter__
in common header file. result same.
file: common.h
#define value __counter__
replace __counter__
value in above files.
Comments
Post a Comment