int start() { int aa=one(); int bb=two(); int dd=three(); Print(dd); return(0); } //+------------------------------------------------------------------+ int one() { int a; a=10; return (a); } //+------------------------------------------------------------------+ int two() { int b; b=20; return(b); } //+------------------------------------------------------------------+ int three() { int d; d=one(); return(d); } //+------------------------------------------------------------------+
I am not quite sure what you are trying to achieve, but the above modifications may help.
You could also pass variables to a function by reference
Thankyou so much
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
dear sir, How can i pass variable value between two functions, and whats wrong in the below code, if i am in function two(), how can i able to get/set value of a in function one() or get or set value of function three(), please make change in such a way that i can able to get the value or set the value of function one() and function three () from function two()