Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ncar!umigw!umiami!slores From: SLORES@umiami.miami.edu (Stanislaw L. Olejniczak) Newsgroups: comp.lang.c Subject: Summary: Realloc of function parameter problem. Message-ID: <3772@umiami.miami.edu> Date: 27 Nov 89 14:19:14 GMT References: <3752@umiami.miami.edu> <1989Nov26.195601.20874@virtech.uucp> Organization: Univ. of Miami (IR) Lines: 24 Many thanks for the numerous answers I received to my question. The problem was, of course, the requirement that realloc receives as an argument either a pointer previously returned by a malloc _or_ (char *)0, while I passed to it a pointer initialized as char *p = "A string". Some respondent warned me that some compiler implementations get confused if the argument is (char *)0. Knowing all this I went back to TFM, including some for beginners, some for intermediate, and some for advanced users, and looked again for a clear reference to that fact. I was able to piece the reason from various section of K&R, but simply _nowhere_ could I find documentation for realloc stating that fact. This includes basic and intermediate manuals, which went to great lengths to explain dynamic memory allocation. If someone would have a suggestion on a book or two that would go into such matters in a fairly clear manner, I woulod appreciate the recommendations. Again, thanks for all your help and assistance. ---- Stan Olejniczak Internet: slores@umiami.miami.edu University of Miami, FL USA UUCP: (temp void) gould!umbio!solejni SLORES@UMIAMI.BITNET UUCP: (?) umigw!gables!slores Voice: (305) 547-6571 FAX: (305) 548-4612 My opinions cannot possibly represent the views of anyone else!