Sorry for the noob question I'm just a little confused.
If I have an array of structures in main that I want to pass to a function:
struct MyStruct{
int a;
int b;
char c;
mayarray[5];
};
MyStruct StructArray[10];
myFunction(StructArray[])
Pass to this to a function:
void myFunction(struct MyStruct PassedStruct[])
{
PassedStruct[0].a = 1;
PassedStruct[0].b = 2;
// ... etc
}
My question is, will calling the function like this modify the data in StructArray? I need it to. Would that be call by reference? I'm a little confused. How would I change it so that when I pass the array of structures to the function, the function will modify the array StructArray? I'musing visual studio btw.
Thanks.