chroot
Staff Emeritus
Science Advisor
Gold Member
- 10,266
- 45
Your function should look like this:
And the code calling it should look like:
Passing a struct by value is no different than passing any other kind of variable by value.
- Warren
PHP:
void print_name(struct pers_info record) {
...
}
And the code calling it should look like:
PHP:
for (int n=0;n<5;n++)
print_name(arr[n]);
Passing a struct by value is no different than passing any other kind of variable by value.
- Warren