4、程序常见错误

一、程序常见错误

1、文件后缀名
  • 把上一节的hello.c,换成hello.txt
  • 编译操作
    编译操作

    总结: 也就是说,编译器只能编译.c后缀的文件名

2、无main函数
  • 把上一节的hello.c中的main换成其它名称
  • 编译操作
    编译操作

    总结: 编译通过,但无法进行链接

3、无包含内置类库
  • 把上一节的hello.c中的”#include<stdio.h>”去掉
  • 编译操作
    编译操作

    总结: 也就是说,去掉时,则无法识别printf函数