Can anyone tell me why I'm getting this error when trying to compile hello.c in the Terminal Window?
$ clang hello.c hello.c:7:1: error: expected identifier or '(' { ^ 1 error generated. $
Thanks!
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this communityWithout seeing your code, no. But it's almost certain that you have a syntax error. Perhaps you put a semicolon on the end of the line int main(void)
, or something like that.
Take a close look at whatever code is just before the error.