Questions about enum's, arrays and const's


hi, i'm pretty new arduino , got few questions.

my first 1 why can't that:
code: [select]

enum params
{
  char name[16],
  int switchpin,
  int ledpin
};

const buttons[][params]
{
  { "btnlivingroom", 2, 8 },
  { "btnbathroom", 3, 9 },
  { "btnbedroom", 4, 10 },
  { "btnkitchen", 5, 11 },
  { "btnparking", 6, 12 }
};

void setup() { ... }

void loop() { ... }


and difference between:
code: [select]

new const [] {...}
// or
const [] {...}


please explain carefuly :smiley-kitty:
thanks in advance.

quote
my first 1 why can't that:
because not enum for. looks more struct.

code: [select]
const [][params]
{

so, want variable, of type undefined, no name, constant , 2d array. no way, jose.

quote
and difference between
one steaming pile of stinky crap , other stinky pile of steaming crap.


Arduino Forum > Using Arduino > Programming Questions > Questions about enum's, arrays and const's


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor