| www.delorie.com/archives/browse.cgi | search |
| From: | REMOVE_THIS_mimo AT restoel DOT net_AND_THIS |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Annoying: const char * in Allegro |
| Date: | Mon, 06 Sep 1999 11:24:12 +0200 |
| Organization: | ---------------------------------------------------------------------------- |
| Lines: | 26 |
| Message-ID: | <37D3883C.7B53440D@restoel.net_AND_THIS> |
| References: | <7qrsqb$s9e$1 AT solomon DOT cs DOT rose-hulman DOT edu> |
| NNTP-Posting-Host: | 149.202.163.44 |
| Mime-Version: | 1.0 |
| X-Trace: | scesie13.sie.siemens.at 936609836 16293 149.202.163.44 (6 Sep 1999 09:23:56 GMT) |
| X-Complaints-To: | news AT siemens DOT at |
| NNTP-Posting-Date: | 6 Sep 1999 09:23:56 GMT |
| X-Mailer: | Mozilla 4.08 [de] (WinNT; I) |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Damian Yerrick schrieb:
> All of Allegro's string-handling (textout(), textprintf(), files, etc.)
> functions take a char * instead of a const char *. Anyone know why? Do they
> change the strings in some subtle way? As it stands now, I have to do
> dangerous casts to get my const char * parameters to work without errors or
> warnings.
const char * is c++ while allegro is written in c as far as i can see - so you
should maybe write your own function wrappers:
inline cpp_textout(const char*psz)
{
::textout(....,const_cast<const char*>(psz);
}
regards
mimo
>
> Damian Yerrick
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |