Point of Use
December 22nd, 2007When we moved from C to C++, we were overjoyed that we no longer had to declare all of our variables at the top of the function.
do_something() {
int num = 0;
int another_num = 0;
num = get_a_num();
another_num = get_a_num();
}
We could instead declare them near the point of use, [...]