26 Jun
2006
26 Jun
'06
7:02 a.m.
Mike McCormack wrote:
These strings should really be const. IMO, a better fix would be to add a cast to cast them back to (char*) than to change their storage class.
The trouble is, if you leave them as they were, you get a write-strings warning, since you are pointing a writeable pointer at a read-only string). But if you cast, thus: CHAR *dtype = (LPSTR) "RAW"; ... then you swap the write-strings warning for a cast-qual one. In general, it's a solution that Alexandre has accepted. -- Andy.