| delorie.com/archives/browse.cgi | search |
| From: | manni DOT heumann AT gmx DOT de (Manni Heumann) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Help... classes and optimization problem |
| Date: | 27 May 2001 09:31:04 GMT |
| Lines: | 20 |
| Message-ID: | <Xns90AE75691951Bmanniheumanngmxde@130.133.1.4> |
| References: | <k1BP6.1409$vu4 DOT 130732 AT news3 DOT oke DOT nextra DOT no> |
| NNTP-Posting-Host: | 129.70.165.140 |
| X-Trace: | fu-berlin.de 990955864 705457 129.70.165.140 (16 1428 [54749]) |
| User-Agent: | Xnews/4.05.11 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Vermin wrote in message
news:k1BP6.1409$vu4 DOT 130732 AT news3 DOT oke DOT nextra DOT no:
[snip]
> someting(char string[256]);
[snip]
> ..but I get a "general protection fault" error when I use
> the following code:
>
> something s("Angel!");
>
> ..and this is only when optimization is turned on (-O2 or
> -O3). What might be wrong? Any suggestions?
>
Change the "char string[256]" arguments of your methods to
"char* string" and everything should work just fine.
Manni
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |