我是编程新手,如果这是一个愚蠢的问题,请原谅我。我在 Linux Debian 发行版中使用 VSC。当我在终端中运行
gcc variables.c -o variables
时,它输出不适用于文件当前保存的错误。
#include <stdio.h>
int main() {
int sourceInt = 99;
printf("source int = %d", sourceInt);
}
尝试在终端中运行代码后,即使在编辑掉它提到的所有变量后,它也会给我这些错误?
variables.c: In function ‘main’:
variables.c:12:12: warning: missing terminating " character
12 printf("source int %d, source double %f\n
^
variables.c:12:12: error: missing terminating " character
12 printf("source int %d, source double %f\n
^
variables.c:13:18: error: stray ‘\’ in program
13 targetChar %c\n", sourceInt, sourceDouble,
^
variables.c:13:17: error: ‘c’ undeclared (first use in this function)
13 targetChar %c\n", sourceInt, sourceDouble,
^