About array matrix for lot of parameters

Hi all.
I'm trying to use many parameters as:

int count00 = 0, count01 = 0, count02 = 0, count03 = 0, count04 = 0, count05 = 0, count06 = 0;
int count10 = 0, count11 = 0, count12 = 0, count13 = 0;
int count20 = 0, count21 = 0, count22 = 0, count23 = 0,
int count30 = 0, count31 = 0, count32 = 0, count33 = 0,

I cast it: int count[4][7] = {}; seems not right?

need help how to make it please?
Thanks
Adam

You made it. There are array positions that go unused, or at least unmentioned explicitly in your initial values, large deal not. Those would all be zero anyway if it's a global variable or a static variable in a function.

What have you tried that doesn't work?

I assume by "I cast it" you are not referring to a C/C++ cast, rather using colorful language for "writing", like casting a spell.

You know the drill… post the code!

a7

1 Like

Thank you.
I was worry of the empty positions, if not a big deal, it's OK.
ya.. write it.

One hopes you aren't one day finding a sudden need for eighteen bytes…

Imma guess the increased efficiency of code that can use those variables as an array will more than outweigh the "waste" of the empty slots.

a7

1 Like

hope so.
there are lot of thing I need to learn yet.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.