| delorie.com/archives/browse.cgi | search |
| From: | gsm77 AT aol DOT com (GSM77) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re : Problem with structs |
| Date: | 15 Jun 1998 11:34:35 GMT |
| Lines: | 16 |
| Message-ID: | <1998061511343500.HAA16723@ladder03.news.aol.com> |
| NNTP-Posting-Host: | ladder03.news.aol.com |
| References: | <3581BEF0 DOT 8790BC2F AT netrover DOT com> |
| Organization: | AOL, http://www.aol.fr |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
When you wrote :
=================
char caption[20] = button[callsign].caption[20];
=================
You asked to DjGpp to copy a "const ( char * )" into a "const ( char * )".
"caption" is a constant pointer toward a allocated memory space. So you can NOT
make it point on something else ...
So make it (char * ), or use "memcpy" or "strcpy" who copy a string into
another.
good luck ...
Kamy ... ;-)
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |