http://www.gubbe.ch/code/libcfgparse...8h-source.html
That page contains a header that when included does not define any of
the typedefs or any of the value references that are in that file. For
instance, I included that file and then tried this:
switch (file.get_type("valid_operating_systems"))
{
case CFG_ITEM_NONE: cerr << "NONE" << endl; break;
case CFG_ITEM_INTEGER: cerr << "INT" << endl; break;
case CFG_ITEM_BOOLEAN: cerr << "BOOL" << endl; break;
case CFG_ITEM_FLOATINGPOINT: cerr << "FLOAT" << endl; break;
case CFG_ITEM_STRING: cerr << "STR" << endl; break;
case CFG_ITEM_CONTAINER: cerr << "CONTAINER" << endl; break;
default: cerr << "WHO THE FUCK KNOWS?!" << endl;
}
When compiled with g++ I get an error saying that none of those
identifiers exist. But they are quite obviously defined right there in
the file I included! If I copy the definition for CfgItemType into my
source file it compiles just fine. I would really like to understand
what the hell is going on here if anyone can figure that out.
Thanks.