Help with struct variable I made a struct like this: 

typedef struct { 
  int color[3];
  int positions[4];
  char init[20];
  void (*fn)();
} buttons;


and a variable like this:

button test[1] =  
{
  {{0,0,0},{0,0,100,100},"getSomething",setSomething}
}


In loop() I call test[i].color, test[i].position normally.

Problems start when I want to execute a function. 

I made two attemps, one with string and one with a function statement. With the string I have no problems using a strcmp() but it's not what I want.

I need to know how I can store 2 different functions in the struct and how I can execute.

Thanks in advance!
The typedef is no longer needed, using the 'struct' with a name declares the type.

// Arduino Uno

struct buttons
{ 
  int color[3];
  int positions[4];
  char init[20];
  void (*fn)();
};

// Declare the functions here, or use prototyping
void func1();
void func2();

buttons test[] = 
{
  { {0,0,0},    {0,0,100,100}, "getSomething",  func1 },
  { {40,40,40}, {50,50,10,10}, "somethingElse", func2 },
};

void setup()
{
  Serial.begin(9600);
  Serial.println("Calling the functions:");

  test[0].fn();
  test[1].fn();
}

void loop()
{
}

void func1()
{
  Serial.println("func1");
}

void func2()
{
  Serial.println("func2");
}