Hello World程序

重新打开该项目,它将恢复状态的IDE我们离开的地方。 当我们选择来编译我们的程序,项目文件进行编译和链接告诉编译器和链接器。 这是值得注意的一个IDE的项目文件将无法在其他IDE。

其次,有各种不同的项目。 当你创建一个新的项目,你将不得不选择一个项目类型。 在本教程中,我们将创建的所有项目将控制台项目。 意味着我们要创建程序,可从DOS或者Linux的命令行运行一个控制台项目。 默认情况下,控制台应用程序没有图形用户界面(GUI)和被编译成独立的可执行文件。 这是完美的学习C + +,因为它保持到最低限度的复杂性。

传统上,第一个程序的程序员写一个新的语言,是臭名昭著的Hello World程序 ,我们不会剥夺你这方面的经验! 以后你会感谢我们。 也许吧。

例子包含代码的快速笔记

从这一课,你会看到许多的C + +代码的例子。 这些例子大多会是这个样子:

1
2
3
4
5
6
7
8
#include <iostream>
 
int main()
{
    using namespace std;
    cout << "Hello world!" << endl;
    return 0;
}

If you select the code from these examples with your mouse and then copy/past it into your compiler, you will also get the line numbers, which you will have to strip out manually. Instead, click the “copy to clipboard” link at the top of the example. This will copy the code to your clipboard without the line numbers, which you can then paste into your compiler without any editing required.

Visual Studio 2005 Express

To create a new project in Visual Studio 2005 Express, go to the File menu, and select New -> Project. A dialog box will pop up that looks like this:


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值