Hi all, I'm having a little bit of trouble with my code about structures
I have decleared structure and I want to initialize array in single statement
errorCode:#include<stdio.h>
#include<stdlib.h>
struct point
{
int array[5];
};
int main()
{
struct point svar;
struct point spvar;
svar.array[5] = {1, 2, 3, 4, 5};
return 0;
}
Code:error: expected expression before '{' token
svar.array[5] = {1, 2, 3, 4, 5}
can anyone tell me what's the reason of error