C++ Primer:Exercises Section 1.1.1
来源:互联网 发布:linux 关闭tomcat 编辑:程序博客网 时间:2024/04/28 00:02
Exercise 1.1:查看所用的编译器文档,了解它所用的文件命名规范。编译并运行本节的 main 程序。
int main() { return 0; }
由于此main函数没有执行任何操作,执行后无任何返回结果
Exercise 1.2:修改程序使其返回 -1。返回值 -1 通常作为程序运行失败的指示器。然而,系统不同,如何(甚至是否)报告main 函数运行失败也不同。重新编译并再次运行程序,看看你的系统如何处理 main 函数的运行失败指示器。
int main(){return -1;}
运行后仍无任何报错,使用IDE为VS2010
1>------ 已启动生成: 项目: HelloWorld, 配置: Debug Win32 ------
1>生成启动时间为 2011/11/24 11:28:51。
1>InitializeBuildStatus:
1> 正在创建“Debug\HelloWorld.unsuccessfulbuild”,因为已指定“AlwaysCreate”。
1>ClCompile:
1> Main.cpp
1>ManifestResourceCompile:
1> 所有输出均为最新。
1>Manifest:
1> 所有输出均为最新。
1>LinkEmbedManifest:
1> 所有输出均为最新。
1> HelloWorld.vcxproj -> c:\users\shiyj\documents\visual studio 2010\Projects\HelloWorld\Debug\HelloWorld.exe
1>FinalizeBuildStatus:
1> 正在删除文件“Debug\HelloWorld.unsuccessfulbuild”。
1> 正在对“Debug\HelloWorld.lastbuildstate”执行 Touch 任务。
1>
1>生成成功。
1>
1>已用时间 00:00:01.02
========== 生成: 成功 1 个,失败 0 个,最新 0 个,跳过 0 个 ==========
- C++ Primer:Exercises Section 1.1.1
- C++ Primer:Exercises Section 1.5.1
- C++ Primer:Exercises Section 1.3
- C++ Primer:Exercises Section 1.6
- C++ Primer:Exercises Section 2.2
- C++ Primer:Exercises Section 2.3
- c++ primer exercises section 4.1
- C++ primer practice: 5.4.1 (Exercises section) answer
- c++primer exercises 2.9
- c++primer exercises 7.0
- C++ Primer:Exercises Section 1.2.2
- C++ Primer:Exercises Section 1.4.2
- C++ Primer:Exercises Section 1.4.3
- C++ Primer:Exercises Section 1.4.4
- C++ Primer:Exercises Section 1.5.2
- C++ Primer:Exercises Section 2.1.2
- C section 1.1 c
- C section 1.1 a
- #Pragma Pack(n)与内存分配
- nodeJS入门例子一—全局对象之控制台(console)
- C#中,模拟DataGridView的CellClick事件
- Sed简介 如何做替换
- 使用cscope
- C++ Primer:Exercises Section 1.1.1
- case语句按条件更新数据列
- 一站式WPF--依赖属性(DependencyProperty)二
- 第四部分 为Cassandra1.0.x准备java运行环境
- <转> Android开发者应该深入学习的10个开源应用项目
- Windows环境下Unicode编程总结
- 解决iframe框架的高度
- Java中String,StringBuffer,StringBuilder区别
- 搜索引擎技巧