⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 05_05.cpp

📁 一些C++的课件和实验源代码
💻 CPP
字号:
// 05_05.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <stdio.h>
#include <conio.h>

class A{};

class B{ int x; };

class C{ 
	static int x;	B  b;   
};

class D{   
	int x;
	C   c;
	D();
	~D();
};

class E{
	int x;
	C   c;
	E();
	virtual ~E();
};

class F{
	char  char1;
	short short1;
	C c1;
	char  char2;
	C c2;
	short short2;
	C c3;
	short short3;
};

int main(int argc, char* argv[])
{
	printf("\n sizeof(A) = %d", sizeof(A));
	printf("\n sizeof(B) = %d", sizeof(B));
	printf("\n sizeof(C) = %d", sizeof(C));
	printf("\n sizeof(D) = %d", sizeof(D));
	printf("\n sizeof(E) = %d", sizeof(E));
	printf("\n sizeof(F) = %d", sizeof(F));

	getch();
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -