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 defining

i want to send 300 constant values to an array and i defined it in this way
code unsigned int a[]= '' 936, 956, 1100, 1208, 1150, 986''; // like these all 300 values

but keil software gives error in these ''''' and say unspecified... pls tell me how can i store large constant values in an array??

Parents
  • not the first time someone has 'jumped into' C and, at the first snag, posted here. I appreciate that nobody can learn all about C by taking a course or reading a book, but for a newbie, the first resource should be checking the book. I can not imagine any C book that does not have an example of an array initialized by numeric constants.

    Why cant the newbies realize that taking a look in the book is a lot faster than waiting for a reply here (especially when the answer is "look in the book").

    now, I do realize that there are issues that can be extremely difficult to solve by "checking the book" and I am not discouraging such be posted here, but simple, basic things where the answer will be (in this case) found by a quick look at the examples in the chapter 'arrays' should be handled by looking in the book

    Erik

Reply
  • not the first time someone has 'jumped into' C and, at the first snag, posted here. I appreciate that nobody can learn all about C by taking a course or reading a book, but for a newbie, the first resource should be checking the book. I can not imagine any C book that does not have an example of an array initialized by numeric constants.

    Why cant the newbies realize that taking a look in the book is a lot faster than waiting for a reply here (especially when the answer is "look in the book").

    now, I do realize that there are issues that can be extremely difficult to solve by "checking the book" and I am not discouraging such be posted here, but simple, basic things where the answer will be (in this case) found by a quick look at the examples in the chapter 'arrays' should be handled by looking in the book

    Erik

Children