954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Passing array of structures to function

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.

Buffalo101
Junior Poster
116 posts since Oct 2009
Reputation Points: 9
Solved Threads: 3
 
Gaiety
Junior Poster
120 posts since Sep 2009
Reputation Points: 13
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: