Okay so I have been having a major issue trying to use a specific struct. Lets start with it:
typedef const struct x
{
....
} *y;
and then I have another struct that has y in it like so:
struct Z
{
...
y someName;
};
Now my main issue here is that I cannot figure out how to use this to assign something to someName.
If I use x and do something like
struct x anotherName =
{
assignedThing
};
trying to do something like
Z.someName = anotherName;
fails saying that anotherName cant be cast as y type.
Obviously I cant try to cheat it by making a y and then assigning the specific part from anotherName because y is a const struct and cant be changed later.
I also cant do
struct y anotherName
that fails, and I cant do
y anotherName =
{
};
because it claims that anymore than one item is too many to initialize when the original struct has like 14.
So frankly im lost here. Is there anyway for me to actually create a defined instance of y or use my currently defined instance of x? Am I missing something obvious (I feel like I am)? Im not in a position where I can rewrite any of the original structs or change it from const or remove the fact that its a pointer so any insight here would be appreciated.