Unless it flashed past me, I didn't see any mention of the ubiquitous
int a=5;
style of initialisation.
I tend to initialise all ints as a zero default with "int xxx = 0;". I know that all globals, etc are initialised to zero anyway by the compiler, but 'belt and braces' kind of habit. That way I don't get weird and wonderful things occurring because my int variable is actually initially -3281932 instead of 0.
I tend to initialise all ints as a zero default with "int xxx = 0;". I know that all globals, etc are initialised to zero anyway by the compiler, but 'belt and braces' kind of habit. That way I don't get weird and wonderful things occurring because my int variable is actually initially -3281932 instead of 0.