if i have a structure like this
Typedef struct CodeNo_Values
{
DataType WeighingUnit;
DataType FinalWeight;
DataType FreeFall;
DataType PreliminaryWeight;
DataType UnderWeight;
DataType OptimalPreliminaryOutput;
} CodeNo;
Typedef struct Timer_Values
{
DataType TareTimer;
DataType TareSteadyTimer;
DataType PreFeedTimer;
DataType DischargeTimer;
DataType StabilityTimer;
} Timer;
Typedef struct Protocol_Values
{
char Stx;
char len
void * Ptr;
char chksum
}Protocol;
1.) No can i do this without doin malloc?
function_foo()
{
Protocol * X;
Timer *T;
CodeNo *C;
x->Stx = 0x45;
x->Len0x32;
x->Ptr = T; // or it could be C
x->chksum = 0x56;
}
2.) Now where is malloc needed?
pal