Re: Compiling Error
On Wed, Mar 22, 2000 at 01:15:01PM +0000, Michal Fecanin Araujo wrote:
> ------------------------------------------------------
> #include <stdio.h>
>
> FILE *output=stderr;
>
> int main()
> {
> fprintf(output,"Hello World\n");
> }
> ------------------------------------------------------
>
> The problem is that its not possible to initialize output with stderr
> because it is not a constant. Is there any solution to this without
> modification of the code, only with gcc options.
No. Your code is invalid, and it should be fixed. You already know the fix.
Now you just have to accept it.
> The following modification is obvius and Iam not interested in it.
Tough.
Thanks,
Marcus
>
> --------------------------------------------------------------
> #include <stdio.h>
>
> FILE *output;
>
> int main()
> {
> output=stderr;
> fprintf(output,"Hello World\n");
> }
> ---------------------------------------------------------------
Reply to: