发表时间:2022-03-25来源:网络
基本类型可以使用一个或多个类型修饰符进行修饰:
signed 有符号unsigned 无符号shortlong
#include
using namespace std;
int main() {
// 基础数值类型 :
short sh = 1;
int i = 1;
double d = 1.1;
float f = 1.2;
// 字符类型
char ch = 'a';
string s = "hello";
// 布尔类型
bool b = true;
cout list of names } 别名;
使用方法:
在这里插入代码片上一篇:【C++】2.C++ 基本语法
下一篇:C++教程(2021第一部分)
2022-03-26
2022-03-26
2022-03-26
2022-03-26
2022-03-26
2022-03-26
2022-03-26
2022-03-26
2022-02-15
2022-02-14