Date: Thu, 22 Dec 1994 11:41:44 +0100 From: "Thomas Eifert, ReZe" Subject: Re: Undeclared string variable To: djgpp AT sun DOT soe DOT clarkson DOT edu Organization: Rechenzentrum RWTH Aachen Curtiss Cicco wrote: > In this C book I am working through, I've come to some code that > won't compile. I get an error msg saying 'str' is undeclared, here's the > code that is giving me problems: > > ------------------------------------------------------------------------ > #include > > main() > { > /* allocate memory for a 100 character string */ > char *string; > if (( str = (char *) malloc(100)) == NULL) the compiler is right, str *isn't' declared. Thomas Eifert