0

I'm doing a chemistry project for my school. It's supposed to give info about any element when its atomic number is given as input.

The code is here : http://pastebin.com/42H1SZhh ( I put it there since it's like 400 lines... )

Now, at line 47, I get this error : chemistry.c:46:3: error: expected '}' before '{' token It highlights the line that contains the opening brace for the element Helium...

{  // This line
          "HELIUM", "He", 2, 4 , -269, -272
 }

It don't really know why this problem occurs, as I've made sure my syntax is right... could anyone point out where the mistake is ? Thank you

4

1 回答 1

4

You're missing commas between your struct initializers. You get the error message in question because without a comma, the compiler expects the thing following the first struct initializer to be the closing brace of the enclosing array initializer.

于 2013-11-09T14:08:28.453 回答