naseeam
asked on
How to pass pointer to array of structure?
struct SomeStruct
{
int value1;
int value2;
}
SomeStruct data[10];
Passing pointer to first array entry would be: &data[0]
Passed argument would be: SomeStruct * addr
Am I correct?
{
int value1;
int value2;
}
SomeStruct data[10];
Passing pointer to first array entry would be: &data[0]
Passed argument would be: SomeStruct * addr
Am I correct?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It can be either a const or non-const pointer. Pass as const unless you plan to modify it.
Open in new window