Sender: shinelight AT detroit DOT crosswinds DOT net Message-Id: <3.0.6.16.19990313015041.1dbffe6a@pop.detroit.crosswinds.net> X-Sender: detr_shinelight AT pop DOT detroit DOT crosswinds DOT net X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (16) Date: Sat, 13 Mar 1999 01:50:41 -0500 To: djgpp AT delorie DOT com, buzdor AT email DOT com From: "Thomas J. Hruska" Subject: Passing/updating pointers... Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com I have never quite figured out how to pass a pointer to a function and have the function update the variable sent to it. So, for many years I have just found ways to work around this little glitch in my memory. Now, I have come to a point in a program that I'm writing where I can't work around the problem anymore. Here is what I want to do: // Read a line of text from buffer in memory and return string char *LineInput(char *src) { char *dest, src2; src2 = src; ... [update input pointer (src) with src2] return dest; } So, how would I go about doing this? That is, how would I call the function and how would I perform the update? Thomas J. Hruska -- shinelight AT detroit DOT crosswinds DOT net Shining Light Productions -- "Meeting the needs of fellow programmers" http://www.geocities.com/SiliconValley/Heights/8504 http://click-on.to/shinelight