www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/12/22/06:06:41

Date: Thu, 22 Dec 1994 11:41:44 +0100
From: "Thomas Eifert, ReZe" <EIFERT AT reze-1 DOT rz DOT rwth-aachen DOT de>
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 <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019