#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
__LINE__does no expand to a "string", but to anint.To get around this you might like to do the following:
Further (gcc) details on