I would not copy the code from a website. Sometimes they make errors. I once posted something on my site and it was not displaying the code right because of the way HTML works. I fixed it later.
Type things out yourself.
Also, I would recommend not using an IDE they do some things for you which is not good all the time. Use a simple text editor like Vim or Gedit.
If you have gcc compile like this:
Code:
$ gcc -o example example.c
There is an easier way to write the hello world program. Do a search.