Newsgroups: comp.lang.c
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!umich!sharkey!bnlux1.bnl.gov!reilly
From: reilly@bnlux1.bnl.gov (kevin reilly)
Subject: pointer->pointer problem
Message-ID: <1991Apr3.174058.13536@bnlux1.bnl.gov>
Organization: Brookhaven National Laboratory
Distribution: na
Date: Wed, 3 Apr 1991 17:40:58 GMT

I have the following problem with a piece of code.
If someone could please tell me what I am doing wrong I woulde be quite
grateful!

FUNC1 returns the address of an array of pointers to strings.
FUNC2 does some string manipulations.

main()
{
char **outPt;

outPut = FUNC1(...);
FUNC2(outPut);
}

char **FUNC1(...)
{
static char *lines[10];
/* do stuff */
return &lines[0];
}

void FUNC2(char **inPut)
{
/* If I manipulate the strings pointed to by inPut in this function
	it seems other strings are also effected.
   Why is this?
*/

}

reilly@bnlux1.bnl.gov

