Z
zhangyefei.yefei
why gcc can not recognize ^M? but cc of SunOS 5.8 can accept it
without error .
-bash-3.00$ gcc a.c -o a
a.c: In function 'main':
a.c:4: error: missing terminating " character
a.c:5: error: missing terminating " character
a.c:6: error: syntax error before 'return'
the following is a.c:
#include<stdio.h>
int main()
{
//^M is produced by ctrl+v,ctrl+m
char a[]={"abc^M"};
return 0;
}
can somebody give any hints ?
thanks in advance.
without error .
-bash-3.00$ gcc a.c -o a
a.c: In function 'main':
a.c:4: error: missing terminating " character
a.c:5: error: missing terminating " character
a.c:6: error: syntax error before 'return'
the following is a.c:
#include<stdio.h>
int main()
{
//^M is produced by ctrl+v,ctrl+m
char a[]={"abc^M"};
return 0;
}
can somebody give any hints ?
thanks in advance.