mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-02-03 18:43:52 +08:00
update
This commit is contained in:
18
basic_content/sizeof/blackclass.cpp
Normal file
18
basic_content/sizeof/blackclass.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @file blackclass.cpp
|
||||
* @brief 空类的大小为1字节
|
||||
* @author 光城
|
||||
* @version v1
|
||||
* @date 2019-07-21
|
||||
*/
|
||||
|
||||
#include<iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class A{};
|
||||
int main()
|
||||
{
|
||||
cout<<sizeof(A)<<endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user