Hi there,
I am a novice programmer and have chosen C to begin with. This is a really really simple code where I am trying to change the fields of of an extern structure. When I compile it with turbo C. I get expression syntax error from the compiler on the only line of code.
Following is the small piece of C code
/*=================================*/
Code:
#include<stdio.h>
struct {
int status[2];
float time[2];
float state[4][2];
} states = {{0,0},{0,0},{{1,2},{3,4},{5,6},{7,8}}};
void main(void)
{
states.status = {1,1};
}
/*=================================*/
I will really appreciate any kind of help.
Thanking you in anticipation.
Regards,
Vivek.