Path: utzoo!attcan!uunet!ncrlnk!ncrcae!ece-csc!ncsuvx!gatech!uflorida!mailrus!cornell!uw-beaver!blake!phaedra From: phaedra@blake.acs.washington.edu (J. Anderson) Newsgroups: comp.lang.c Subject: Dynamically malloc()-able pointers in a struct? Summary: is there a guru in the house? :-) Message-ID: <448@blake.acs.washington.edu> Date: 24 Dec 88 08:37:05 GMT Reply-To: phaedra@blake.acs.washington.edu (J. Anderson) Distribution: na Organization: Entropicana Hotel -- University District, WA Lines: 21 I have a small C syntax problem. Given I have a structure of with the following nature: struct xyzzy { int plugh; long black_rod; char *foobar; /* This wants to be a pointer to a variable-length * array */ } I have tried various means of doing a malloc which _should_ (I think?) assign a memory value to foobar, but to no avail. K&&R doesn't have a lot to say on this subject, nor does volume 5 of the Unix Programmer's Reference manual. Is there a way to accomplish what I wish to do, or have I found a minor limitation in C? -- There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. || phaedra@blake.acs.washington.edu