系统相关
首页 > 系统相关> > VS常用类型及其指针内存

VS常用类型及其指针内存

作者:互联网

int main()
{
	
	cout << sizeof(char) << endl ;
	cout << sizeof(char*)<< endl;
	cout << sizeof(int) << endl;
	cout << sizeof(int*) << endl;
	cout << sizeof(short) << endl;
	cout << sizeof(short*) << endl;
	cout << sizeof(long) << endl;
	cout << sizeof(long*) << endl;
	cout << sizeof(double) << endl;
	cout << sizeof(double*) << endl;
	cout << sizeof(float) << endl;
	cout << sizeof(float*) << endl;
}

输出

1
4
4
4
2
4
4
4
8
4
4
4
苞米地里捉小鸡 发布了53 篇原创文章 · 获赞 2 · 访问量 1024 私信 关注

标签:私信,cout,int,苞米,VS,内存,文章,获赞,指针
来源: https://blog.csdn.net/weixin_42709632/article/details/104610853