Structure in Function
i'm not clearly understand how to put struct in the parameter of a function. If the parameter have one is pass value and another is pass reference.
1 2 3
|
void Read(int num,int num1,float &total_num,float &total_num1)
{
}
|
Anyone helps me understand this problem more clearly. Thanks.
Last edited on
Hi there,
do you mean something like this?
1 2 3 4 5 6 7 8
|
struct mystruct {
int data;
};
void read(int num, mystruct structobject)
{
structobject.data = 3;
}
|
Hope that helps.
All the best,
NwN
Topic archived. No new replies allowed.