I have a structure in which I want to hold various data and a 2D array. Since I have to wait for user input before deciding the array size, I can't declare it directly in the structure. Also, I know that microsoft enables us to declare unsized arrays in a structure but the Linux machines on which I work do not allow it.
At first I just tried declaring a pointer and then assigning my array to it. This works when I want to attach a 1D array but it returns an incompatible pointer assignement with a 2D array. I was wondering what I could do. Stuff like **array does not work either (I had to try it lol).
I don't have a lot of experience in C so I would appreciate it if you could be as explicit as possible.
Thanks in advance.