Announcement

Collapse
No announcement yet.

typedef in Designer.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • typedef in Designer.

    Hello,

    In my c program I use the typedef for define a structure.
    This is my simple code

    typedef struct plants
    {
    int age;
    int energy;
    } PLANT;

    PLANT dummy [32];

    Is it posible to program this in the designer?

    Thanks for any help.

    Jan

  • #2
    The way to do it is
    var PlantAge[32] ;
    var PlantEnergy[32] ;

    You could also use a constant to avoid the duplicated, and potentially error causing 32, but that's up to you.

    Is there a particular reason you need entries in an alternating order?
    Mark

    Comment

    Working...
    X