Re: [anjuta-list] Anjuta new user-why is there an error code with this simple C program?



Hi!

>
> #include <stdio.h>
> int main(void)
> {
>     int dogs;
>
>     printf("How many dogs do you have?\n");
>     scanf("so you have %d dog(s)!\n", dogs);
>     return 0;
>     }
>
>
>
> ....../C Programming /project1/ff.c: line 2: `int main(void)'
>

What you do is running a C file with the shell. Instead, compile it first
and run the created executable afterwards. Wondering how you manged to
make this file executable.

Regards,
Johannes



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]