Hello I'am writing a program and I used structures to make some user defined variables. Then I passed those variables to another function where a value was assigned to them. Now I want the values of those variables to be used in another function. How do I do that?
Below is an example of what I did.
other parts of the program is written here
int function(Goods_g *G)
G->Fish = 50;
G->Cotton = 80;
G->Wood = 100;
G->Coco = 140;
G->Sugar = 350;
G->Guns = 700;
how do I get the values of the individual elements sucn as Fish to use in this function without changing the values
I apologies for the vagueness of the question and the information that I provided but I want to learn how to do this. If any body can help me and point me in the right direction I will be very grateful.