The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > OS X (Apple)
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-05-2006
gumigecko gumigecko is offline
Registered User
 

Join Date: Aug 2006
Location: La Jolla
Posts: 4
Hello World Program

I'm trying to compile and run the following program:

[File: hello/hello.c]
#include <stdio.h>


int main ()
{
printf("Hello World\n");
return (0);
}


This is what I'm getting in Terminal:

[localhost:~/learning_c] aaron% cc -g -ohello hello.c
hello.c:1: error: parse error before '[' token
[localhost:~/learning_c] aaron%


Any tips?

I'm running OSX 10.4.7 by the way.
Reply With Quote
Forum Sponsor