测试数据类型在32位系统下字节

来源:互联网 发布:有哪些新概念武器知乎 编辑:程序博客网 时间:2024/05/16 10:23
#include <iostream>using namespace std;int main(){cout << sizeof(char) << endl; cout << sizeof(short) << endl; cout << sizeof(unsigned) << endl; cout << sizeof(int) << endl; cout << sizeof(unsigned int) << endl; cout << sizeof(long) << endl; cout << sizeof(unsigned long) << endl; cout << sizeof(float) << endl; cout << sizeof(double) << endl; cout << sizeof(void *) << endl;}


0 0
原创粉丝点击