delorie.com/archives/browse.cgi | search |
From: | Weiqi Gao <weiqigao AT a DOT crl DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: I need some help, I am having a hella of a time with Rhide...and DJGPP |
Date: | Sat, 18 Apr 1998 13:57:53 -0500 |
Organization: | Spectrum Healthcare Services |
Lines: | 19 |
Message-ID: | <3538F7B1.EA6410FE@a.crl.com> |
References: | <01bd6af7$7ae2eb40$51878cd1 AT rihqdcee> |
NNTP-Posting-Host: | a116009.stl1.as.crl.com |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
John Doe wrote: > > struct blah {int x, y; char *name; }; > struct blah *testing; > main () { > FILE *fp; The variable testing is a pointer that's not pointing to any particular place at this moment. You need to do something like testing = (struct blah *) malloc(sizeof(struct blah)); here. Your second program has the same problem. > testing->name = " "; -- Weiqi Gao weiqigao AT a DOT crl DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |