cpp 代码
- // VC0401.cpp : 定義主控台應用程式的進入點。
- //
- #include "stdafx.h"
- #include <conio.h></conio.h>
- int _tmain(int argc, _TCHAR* argv[])
- {
- printf("hello, world! 0405\n");
- _getch();
- return 0;
- }// end of main()
下面是 比較簡短的 case
cpp 代码
- #include "stdafx.h"
- #include <conio.h></conio.h>
- int _tmain(int argc, _TCHAR* argv[])
- {
- printf("hello, world! 10:54\n");
- _getch();
- return 0;
- }// end of main()
C++ Hello World 示例
本文提供了两个简单的 C++ 代码示例,展示了如何使用 printf 函数输出文本到控制台,并利用 _getch() 函数暂停程序,等待用户按键。这些示例适合初学者了解基本的 C++ 控制台应用程序结构。
933

被折叠的 条评论
为什么被折叠?



