printf(“The string printed backward is %s\n”,string2);
}
运行命令:
# g++ -o test1 test1.C
错误如下:
test1.C: In function `int main()':
test1.C:8: stray '\241' in program
test1.C:8: stray '\261' in program
test1.C:8: `Hello' undeclared (first use this function)
test1.C:8: (Each undeclared identifier is reported only once for each function
it appears in.)
test1.C:8: parse error before `Linux'
test1.C:8: stray '\241' in program
test1.C:8: stray '\261' in program
test1.C: In function `void my_print(char*)':
test1.C:16: stray '\241' in program
test1.C:16: stray '\260' in program
test1.C:16: parse error before `is'
test1.C:16: stray '\' in program
test1.C:16: stray '\241' in program
test1.C:16: stray '\261' in program
test1.C: In function `void my_print2(char*)':
test1.C:24: `strlen' undeclared (first use this function)
test1.C:25: `malloc' undeclared (first use this function)
test1.C:29: stray '\241' in program
test1.C:29: stray '\257' in program
test1.C:29: stray '\' in program
test1.C:29: stray '\241' in program
test1.C:29: stray '\257' in program
test1.C:30: stray '\241' in program
test1.C:30: stray '\260' in program
test1.C:30: parse error before `printed'
test1.C:30: stray '\' in program
test1.C:30: stray '\241' in program
test1.C:30: stray '\261' in program
You have new mail in /var/spool/mail/root