reset password
Author Message
jpascua
Posts: 197
Posted 20:13 Jan 12, 2015 |

I believe that Keenan said in class that global variables are discouraged. I think that being able to use them would definitely help me further divide my programs into different functions. Do we really have to avoid them entirely?

kscasado
Posts: 19
Posted 20:27 Jan 12, 2015 |

A big part of c++ is dealing with passing parameters through functions. You have more control since you can pass by reference or value, soon when we learn pointers it will make things a little easier so i would reccomend getting used to it. You can run into a lot of security and debugging problems if you get comfortable using globals everywhere. Especially when doing more Object Oriented Programming.