I have a question about structures. I need to write a function that will find the max value of one element of an array of structures. I know how to find the max value of the array of structures, but how do I get the function to return the entire structure not just that portion of it? If that makes any sense.
Max value of an element in array of structs
Collapse
X
-
Tags: None
-
You cannot access a member of a structure without knowing what structure you are accessing. That is, if you can return a portion of a structure, you should be able to return the entire structure itself.
If you are unable to see how, post some code showing where you run into difficulty. -
Thanks for the reply. I realized my professor wanted to return a double instead, so its not necessary.
ThanksComment
Comment