> bit.cpp: In function 'char*' flag_string(const flag_type*, int)':
> bit.cpp: Invalid conversion from 'const char*' to 'char*'

You feasibly could have mentioned it's been ported to C++ when asking for
help....,.. Sometimes little things like *what language it's written in*
make a little difference in how a program works.

>     return (buf[cnt][0] != '\0') ? buf[cnt]+1 : "none";

There's the problem.. "none" is a character constant, not any sort of
allocated memory.  Change that instead to something like:

    if (buf[cnt][0] == '\0')
      strcpy(buf[cnt], " none");
    return buf[cnt]+1;

So you're returning a static char * pointer and not a character constant.
C++ compilers are a lot pickier about that.

--Palrich.


Reply via email to