+ 1

I don't understand where to put which variable?

28th Jul 2016, 4:37 PM
yash sharma
yash sharma - avatar
6 ответов
0
same problem!
28th Jul 2016, 4:45 PM
Urvi
0
but i do think that practice can make things work easily
28th Jul 2016, 4:46 PM
Urvi
0
Actually I have started c++ about a month ago. And teacher had already completed some basic things. That's why it's troubling me.
28th Jul 2016, 4:49 PM
yash sharma
yash sharma - avatar
0
same here
28th Jul 2016, 4:50 PM
Urvi
0
if you're curious about variable placement think about what you want to access it. do you want everything to have access to it? make it global. do you want only one function to use it? declare the variable in that function . do you want it to be passed in as a parameter? then you'll probably declare it on main or a main like function
28th Jul 2016, 8:04 PM
destro
- 1
but there's a problem with me. The concept which our teachers teach is slightly different from this app
28th Jul 2016, 4:53 PM
Urvi