2018年7月21日

C++编程基础一 07-浮点类型

摘要: 1 // 07-浮点类型.cpp: 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 #include 7 using namespace std; 8 9 10 int main() 11 { 12 //12.34 89704.45 8.0 0.454213 13 //E表示法... 阅读全文

posted @ 2018-07-21 14:07 uimodel 阅读(226) 评论(0) 推荐(0) 编辑

C++编程基础一 06-布尔类型

摘要: 1 // 06-布尔类型.cpp: 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 using namespace std; 7 8 int main() 9 { 10 bool a = true; //真 存在的 非零 1 11 bool b = false;//假 不存在 零 0 ... 阅读全文

posted @ 2018-07-21 14:06 uimodel 阅读(119) 评论(0) 推荐(0) 编辑

C++编程基础一 05-字符

摘要: 1 // 05-字符.cpp: 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 using namespace std; 7 8 int main() 9 { 10 //''里的都是字符 11 char c = 'a'; 12 char c2 = ' '; 13 char c... 阅读全文

posted @ 2018-07-21 13:58 uimodel 阅读(121) 评论(0) 推荐(0) 编辑

C++编程基础一 04-整型

摘要: 1 // 04-整型.cpp: 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 #include 7 using namespace std; 8 9 int main() 10 { 11 short a = 3; 12 int b = 100; //变量赋值需考虑变量范围,不能超过最大值... 阅读全文

posted @ 2018-07-21 13:57 uimodel 阅读(165) 评论(0) 推荐(0) 编辑

C++编程基础一 03-变量

摘要: 1 // 03-变量.cpp: 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include 6 using namespace std; 7 int main() 8 { 9 int level = 14;//变量的定义并初始化,给变量第一次赋值的过程称为初始化。 10 cout << level << en... 阅读全文

posted @ 2018-07-21 13:46 uimodel 阅读(117) 评论(0) 推荐(0) 编辑

C++编程基础一 01-我的第一个项目

摘要: 1 // 01-第一个项目.cpp: 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" //自己创建的文件。 header .h结尾的都是头文件。 5 #include //系统内置的文件。#include 预处理指令,把系统内置的iostream(输入输出流)先引入进来。cout属于iostream 6 //using namespace... 阅读全文

posted @ 2018-07-21 13:04 uimodel 阅读(162) 评论(0) 推荐(0) 编辑

导航