vc++6.0怎样编写简单的程序hello world

时间:2024-10-14 00:20:42

1、 因为vc++6.0版本太老,在新版的win10已经不再兼容,所以很多人在安装的时候经常遇到这样那样的问题,其实《C语言自学》系列教程开篇就教给大尸园拽诟家:怎样在win10操作系统安装vc++6.0, 还不知道的请参考下面提供的友情链接。这里就以这个C环境为例,演示hello world的编写,我们打开VC++6.0编译器。

vc++6.0怎样编写简单的程序hello world

2、使用快捷键Ctrl+N,或者点击菜单栏的新建,1. 建立一个工程,选择倒数第三个 console application2. 给工程命名

vc++6.0怎样编写简单的程序hello world

3、点击建立一个空工程,如图

vc++6.0怎样编写简单的程序hello world

4、点击完成,如图3、4两步骤可以快速点击回车即可。

vc++6.0怎样编写简单的程序hello world

5、继续Ctrl+N,新建一个文件,1. 选择C++ source files2. 给该文件命名

vc++6.0怎样编写简单的程序hello world

6、进入到新建的 .cpp窗口中,切换至英文输入法,输入如下命令:#include <stdio.h>void main(){ printf("hello world\n");}其中:# 读作sharp,stdio.h 表示standard input&output head 标准输入输出头文件void 空返回值 main 为主函数printf 输出函数\n 即为回车,用于换行;表示该语句结束{ } 成对出现,别遗漏

vc++6.0怎样编写简单的程序hello world

7、快捷键Ctrl+F7进行编译,Ctrl+F5执行先编译,底部有0 error,0 warning,再执行有错误或者警告,可以向上翻阅查找错误点,进行修改,再执行。

vc++6.0怎样编写简单的程序hello world

8、结果如下,经典的hello world!编写完成,祝你早日通过C语言考试。

vc++6.0怎样编写简单的程序hello world

9、文字不重要,看图:

vc++6.0怎样编写简单的程序hello world
© 手抄报圈