There is no issue declaring a variable in a function. They are allocated to the stack frame, and then popped off when they go out of scope. Just remember for every new you need a delete, and for every malloc call you need to call free, and everything will be fine. But other than that, nice base!
But I would think always creating local variables might result in a stack overflow?
Currently coding applications in Java and C++.
"It is change, continuing change, inevitable change, that is the dominant factor in society today. No sensible decision can be made any longer without taking into account not only the world as it is, but the world as it will be." -Isaac Asimov
Publicist Since 04.04.2015
Middleman Since Unknown - Unknown Global Moderator Since 08.01.2013
Donator Since 05.29.2013
Minion+ Since 04.18.2013
District 187 Minion Since 04.04.2013
Steam Minion Since 02.26.2013
WarRock Minion Since 02.19.2013
A.V.A Minion Since 02.13.2013
DayZ Minion Since 01.21.2013 Combat Arms Minion Since 12.26.2012 Contributor Since 11.16.2012
Member Since 05.11.2010