I have this code:
typedef struct {
int a
} array[1];
int main (array var)
{
if ((var->a) == 0)
return 0;
}
and I want to copy var to a new variable. It seems it should be something like
typedef struct {
int a
} array[1];
int main (array var)
{
array newvar = var;
if ((newvar->a) == 0)
return 0;
}
But when I compile this program I get this error: invalid initializer. So, if array is not the correct type what is the correct type for var when I want to assign it to a new variable?