main.cpp:4: error: variable or field 'function' declared void
main.cpp:4: error: 'example' was not declared in this scope
main.cpp: In function 'int main()':
main.cpp:16: error: 'function' was not declared in this scope

Ill post the forward declarations I tried in the next post to separate it

main.cpp:4: error: use of enum'example' without previous declaration
main.cpp:5: error: variable or field 'function' declared void
main.cpp:5: error: 'example' was not declared in this scope
main.cpp: In function 'int main()':
main.cpp:17: error: 'function' was not declared in this scope