문제

I have got snippet of old c-code with that lines (result is just slash sign):

putchar('/' //**/ 
    1 / 1 /'\1');

Can anyone explain this snippet? What does this symbols mean?

P.S. By the way it compiles well with std=c89 flag in gcc, but not with std=c99.

도움이 되었습니까?

해결책

That's a division, followed by an empty comment. In C99 mode, it's a new-style comment, causing a syntax error because there's no division operator now.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top