c++
c++
wchfeng_justdoit
努力
展开
-
输入输出模板
#include <iostream> #include <iomanip> using namespace std; int main() { cout<<setiosflags(ios::left|ios::showpoint); // 设左对齐,以一般实数方式显示 cout.precision(5); // 设置除小数点外有...原创 2020-03-28 15:52:07 · 183 阅读 · 0 评论 -
转义序列码
图来自菜鸟教程原创 2020-03-28 14:35:35 · 155 阅读 · 0 评论 -
枚举类型的使用
1.定义: enum 枚举名{ 标识符[=整型常数], 标识符[=整型常数], ... 标识符[=整型常数] } 枚举变量; 例如:定义枚举color有三种颜色:red ,green, blue enum color{ red , green, blue } c3; c3 = red; color c(color(0)); co...原创 2020-03-27 22:36:24 · 198 阅读 · 0 评论 -
基本数据类型
主要有七种基本类型:bool、char、int、float、double、void、wchar_t(宽字节型) 其中wchar_t是由 typedef short int wchar_t; 定义而来的。 bool: 所占字节数:1最大值:1最小值:0 char: 所占字节数:1最大值:最小值:? signed c...原创 2020-03-27 22:24:59 · 176 阅读 · 0 评论