Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Too many initializers for 'byte [26][8]'

Status
Not open for further replies.

Tanmay_Karmakar

New Member
I've been trying to work with a 2d array as mentioned 26 rows and 8 columns each. But the same error msg is poping up at compilation. What should I do?
 
Ex
.. .. if you can get past their egos !

MM
Exactly I tried the forum previously for another solution, I don't like it there.
However, I've attached the main part of the program and as for the array declaration and initialization I'm pretty sure there's no problem except if there's too many array elements to hold .
I've tried initializing the 2d array both globally and in a separate library file, the same results keep coming up.
 

Attachments

  • Screenshot_20200717-071133_1.jpg
    Screenshot_20200717-071133_1.jpg
    99 KB · Views: 436
Try,
Code:
char test[2][8] = {
                  1,2,3,4,5,6,7,8,
                  1,2,3,4,5,6,7,8
                  };

Mike.
Edit, what is the error message?
Edit2, Your binary numbers need 0b in front of them.
 
Last edited:
Ex
Exactly I tried the forum previously for another solution, I don't like it there.
However, I've attached the main part of the program and as for the array declaration and initialization I'm pretty sure there's no problem except if there's too many array elements to hold .
I've tried initializing the 2d array both globally and in a separate library file, the same results keep coming up.


I’m willing to make a couple of bets.

Until you post all of your initialization code, you won’t get an answer. We’re just guessing.

Secondly, the problem is caused by a silly typo. Either mismatched braces or a missing (or extra) comma.

As mentioned, post your code with code tags.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top