Hello,

I'm having problems passing an array of structures to a function by reference. Is this
a) needed
b) achievable?

My assignment's requirements aren't very thorough, but it is however in the "Reference parameters" section.

struct x{
	            int a;        // this is irrelevant
                        float b; 
		
}stud[10];

void mod( ??? ){

}

Since I declare my structure before main(), do I need to use & when adding/modifying a stud[x].a in my structure? how can I do that?

Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.