Mail Archives: djgpp/1994/12/22/06:06:41
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 <stdlib.h>
>
> 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
- Raw text -