#define LINE_FILE ("Line"#__LINE__"of file"__FILE__)
int main(void)
{
printf("%s", LINE_FILE);
}
What I expected:
LINE_FILE = "Line linenumber of file filename"
and printf()
can output this string.
http://ww2.sinaimg.cn/large/005FchG6gw1esb0pvwxr3j30he06jjt7.jpg
AFAIK you can not do that on the preprocessor, the usual way is: