uibk_703807-Advanced-CXX/topic/little_features/empty_struct.cpp

11 lines
141 B
C++
Raw Normal View History

#include <iostream>
// Emptry structs are valid in C++, not so in C.
struct Empty {
};
int main()
{
std::cout << sizeof(Empty) << "\n";
}