Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- union Value {
- char* s;
- int i;
- };
- enum Type {str, num};
- struct Entry {
- char* name;
- Type type;
- Value val;
- };
- ...
- void EntryHandler(Entry& ent) {
- if(ent.type == str) {
- std::cout << ent.val.s;
- }
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement