I'd suggest changing the data structure to put the data first, but this might have other problems ... if it is an expandable array of char it can't be first and not having seen the POL sources I wouldn't want to suggest it at this point.
However, you _can_ define the casting operator for const char * to do the proper thing, wherever the data is physically located in the class structure. That should be sufficient for most purposes such as you describe. -- -Richard M. Hartman [EMAIL PROTECTED] 186,000 mi/sec: not just a good idea, it's the LAW! "Henry Skoglund" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] ... | The only thing that has bit me a | few times | is that the CString class in POL has its character data at offset 6 from the | this ptr, | not offset 0 as MFC does. That means that you cannot freely substitute a | const Char* pointer with a CString instance without casting, let me show | you: | CString a,b; | a = "foo"; | b.format("%s bar",a); | This makes b equal to "foo bar". But in POL you have to say | b.format("%s bar",(const Char *) a); | to achieve the same effect. Note: this is only a minor complaint from an old | man, | if POL went opensource I might take at shot at fixing it... But POL is good | otherwise! | /Henry | | | | -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
