as title said,the code blow gives error with g++:
error: expected specifier-qualifier-list before ‘logType’
Code:
enum
{
log_memory,
log_filesystem,
log_default
}logType;
typedef struct
{
logType type;
void (*logPrint)(char* msg);
}logsystem;
This:
declares a variable, not a type. You want this:
[Side-note: Usual C++ conventions are to have type-names start with a capital letter.]