This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Array syntax error

Hi all,

what is the syntax error below?

int myarray[2] = {10,20};

while it compiles ok if int is changed to char.

Regards
Dravid

Parents
  • "You have most likely made some sort of trivial mistake in the code preceding that line"

    Or, you have not posted here exactly what you had in your source file.

    Use cut-and-paste to avoid this possibility.

    Perhaps you could also post a few lines of context, and the full verbatim text of the entire error message?

Reply
  • "You have most likely made some sort of trivial mistake in the code preceding that line"

    Or, you have not posted here exactly what you had in your source file.

    Use cut-and-paste to avoid this possibility.

    Perhaps you could also post a few lines of context, and the full verbatim text of the entire error message?

Children