我正在尝试在 24 小时内从 Sam's Learn C 编译一个示例。
当我尝试编译以下代码时出现错误:
/* 03L02.c: Calculate an addition and print out the result */
#include <stdio.h>
/* This function adds two integers and returns the result */
int integer_add( int x, int y )
{
int result;
result = x + y;
return result;
}
int main()
{
int sum;
sum = integer_add(5, 12);
printf(“The addition of 5 and 12 is %d.\n”, sum);
return 0;
}
这是我的编译器给出的错误:
In function main
stray "\147\' in program
The undeclared identifier is declared only once
for each function it appears in
syntax error before addition
stray "\' in program
stray "\148' in program
提前致谢。