-
structure array
How can I assign the same structure multiple times to an array.
For example "my_struct array[0]", "my_struct array[1]" and so on, so that array[0] is the same as array[1]. The reason I want to do this is because later on I will use these arrays and give them different values so that the same structure elements in array[0] will have different values from the elements in array[1].
-
Code:
for (i = 1; i < array_count; i++)
{
array[i] = array[0];
}
-
I wish it was that simple. The whole problem is how to put a structure in array so that array[0] will point to my_struct.