Mail Archives: djgpp/1998/07/28/03:45:17
"Chia" <chia AT top DOT net> writes:
>
> I've been programming C++ and Allegro. I have a String called, "TheText" in
> one of my classes which I want to print to the screen with "textout()."
>
> However, the textout() function only does (unsigned char *)'s.
>
> I am lost when it comes to how to convert the String to this, and without
> doing that I can't print the text. If someone could help it'd be great.
>
> I've tried a simple typecast: (char *)TheText, and that didn't compile.
Try (char *)(const char *)TheText, it works for me. This isn't exactly
an elegant solution, the best way would be if textout wanted a
(const unsigned char *).
HTH
/Magnus
- Raw text -