I have two different structs in c file, struct A and B:
typedef Struct _A
{
float arr[4];
}A;
typedef struct _B
{
float const x;
float const y;
}B;
A* objA = (A*)malloc(sizeof(A));
B* objB = (B*)malloc(sizeof(B));
what I need to do is assign arr values with values from struct B
objA->arr = {objB->x, objB->y, objB->x, objB->x}; /// getting an error here : expression must be a modifiable lvalue.
I have memcpy so far, but that ends in another error "expression expected". is there any way to do this?
Thanks in advance!