Can we assign one variable from a structure to another variable of a same type which is in a different struct, directly in C++? Such as:
struct Test1
{
inx x1;
int y1;
}
struct Test2
{
int x2;
int y2;
}
void trialStruct(Test2& origin2)
{
Test1 origin1;
origin1.x1 = origin2.x2;
origin2.y1 = origin2.y2
}