|
如下代码:
main()
{
printf("kldjfklsdjfkls
sdlkfjksldjflksdjf
sdfjsldkfjl\n");
}
用gcc3.3与gcc4.1.2进行编译,出现如下错误:
a.c: In function 'main':
a.c:3: error: missing terminating " character
a.c:4: error: 'sdkjfklsdjfkldjs' undeclared (first use in this function)
a.c:4: error: (Each undeclared identifier is reported only once
a.c:4: error: for each function it appears in.)
a.c:5: error: expected ')' before 'sdklfjlsdkflsdf'
a.c:5: error: stray '\' in program
a.c:5: error: missing terminating " character
a.c:6: error: expected ';' before '}' token
意思是,字符串不能换行,但在gcc2.7或2.9却可以编译通过,如何解决这个问题?在新版的gcc也能处理这个问题。 |
|