better-enums/example/1-hello-world.cc
Anton Bachin e1e237a4ea Renamed top-level macro ENUM to BETTER_ENUM.
To reduce name clashes.

Fixes #11.
2015-10-04 11:03:08 -05:00

24 lines
478 B
C++

// This file was generated automatically.
// Hello, World!
//
// Download enum.h, then compile this program:
#include <iostream>
#include "enum.h"
BETTER_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!