mirror of
https://github.com/aantron/better-enums.git
synced 2025-12-06 16:56:42 +08:00
24 lines
477 B
C++
24 lines
477 B
C++
// This file was generated automatically.
|
|
|
|
// Hello, World!
|
|
//
|
|
// Download enum.h, then build this program with it:
|
|
|
|
#include <iostream>
|
|
#include "enum.h"
|
|
|
|
ENUM(Word, int, Hello, World)
|
|
|
|
int main()
|
|
{
|
|
std::cout << (+Word::Hello)._to_string() << ", "
|
|
<< (+Word::World)._to_string() << "!"
|
|
<< std::endl;
|
|
|
|
return 0;
|
|
}
|
|
|
|
// Run it, and you should see the output "Hello, World!"
|
|
//
|
|
// Congratulations, you have just created your first Better Enum!
|