[prog] structures containing structures 2
sena emre
senaemre at yahoo.com
Wed May 30 09:15:22 UTC 2007
Hi Tim,
Thanks for your help. You are true, I am a beginner. But I think that I am not to bad....:) Anyway I just did not understand that part;
solution_t& solution = solutions[idx_solution];
box_t box = solution.cargoes[idx_cargo];
why did you use & operator for the first definition? more, why we defined box of type box_t instead of cargos of type box_t? Because we defined cargos of type box_t under solution_t.
Also another point is that how should I pass a structure to a function? Is this function prototype declaration suitable for this purpose?
void pass( struct solution_t solution);
one last question is ...:) Sometimes I get across to code like this...
solution_t *solution = NULL;
what this line tells to the compiler....
thanks again...
SEMRE
---------------------------------
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
More information about the Programming
mailing list