Code:
#include<stdio.h>
#define UINT16 short int //Just define whatever you want 
typedef union
{
    struct
    {
         unsigned bs:1;
         unsigned bc:1;
         unsigned ba:1;
         unsigned ac:1;
    }bit;
    short int all; // you cannt put int with short
}DI_Bits;

typedef struct
{
   DI_Bits   bits;
   UINT16 alm_timer;//define it
   UINT16 delay_time;
   UINT16 sim_delay;
}DigitalInputs;

//static short int *bits[20];   // one time
//static short int *reg[20];


//source file
DigitalInputs DI;
//for bits
// second time
static short int *bits[20] = {    
    &DI.bits.all, // this way I included all other structures that holds the bits
};

// for registers
static short int *reg[20] = {
   &DI.alm_timer,
   &DI.delay_time,
   &DI.sim_delay
};

int main():w!

{
  return 0;
}

Last edited by shabbir; 18Mar2008 at 09:59.. Reason: Code block - http://www.go4expert.com/forums/misc.php?do=bbcode#code