0

Week 1 and I was following along with Lecture Continued. When I tried to compile I got this error...

1 error generated. make: *** [hello] Error 1

I have never worked with Linux or command lines before and don't know where to start fixing this.

#include <stdio.h>

main()
{
    printf("Hello, world!\n");
}

please help

0

main has to return an integer to the calling program, the operating system. Very simply, you didn't properly define main. You must define it as returning an integer. Try it this way:

#include <stdio.h>

int main()
{
    printf("Hello, world!\n");
}

If this answers your question, please accept this answer to remove the question from the unanswered question pool. Let's keep up on forum housekeeping. ;-)

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .