C++_基本内置类型 By takethat 总阅读次 发表于 2017-03-25 文章目录 C++中基本内置类型指:算术类型(arthmetic type)、和空类型(void) 算术类型:字符、整型数、布尔值、浮点数 1234567891011121314151617181920#include <iostream>using std::cout;using std::endl;int main(){ unsigned char i = -1; printf("%d\n", i); printf("******\n"); cout << i << endl; printf("*****************************\n"); unsigned char j = '-1'; printf("%d\n", j); cout << j << endl; return 0;} 空类型:用于特殊的场合,例如最常见的是,当函数不返回任何值时使用空类型最为返回类型。 ------------------------------------------------------------------------------------------------------------------------------ 打赏我的人,运气都不会太差~ ------------------------------------------------------------------------------------------------------------------------------ 打赏我的人,运气都不会太差~