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

How initialize an array with non-constant variables in c?

hi to all

sorry but i did not have any option. i know this is not the proper forum for this question but i struck very badly.please suggest any way.

not google i done that already

any alternate option also welcome

How initialize an array with non-constant variables in c?

Parents
  • ISO/IEC 9899:1990 also states:

    "The initialiser for a structure or union object that has automatic storage duration either shall be an initiliser list ... or shall be a single expression that has compatible structure or union type."

    So, if you could wrap your array in a structure, that might help...

Reply
  • ISO/IEC 9899:1990 also states:

    "The initialiser for a structure or union object that has automatic storage duration either shall be an initiliser list ... or shall be a single expression that has compatible structure or union type."

    So, if you could wrap your array in a structure, that might help...

Children
No data