compilation error with OpenWatcom (class specifier missing)
Brought to you by:
leethomason
The following line :
const TiXmlString::size_type TiXmlString::npos =
static_cast< size_type >(-1);
should become :
static const TiXmlString::size_type TiXmlString::npos =
static_cast< TiXmlString::size_type >(-1);
The compile error get's fixed by using
TiXmlString::size_type in the cast, not just size_type !
In the cpp file we should also respecify it's a static
const. Note it is best to assign the value directly in
the header file, no need to retype all that information
then. Drawback, change of value -> all clients also
recompile. And some older compilers (pre 1998) might
not support this.
kind regards,
Lieven
Logged In: YES
user_id=602705
the static should not be respecified, my mistake. But
putting everything in the header still is a valid remark.