is there any real reason why some prefer one style over another whyle using them ? :
and the one belowCode:if (col == 1) cout << '*'; else { if (col == height * 2) cout << '*'; else cout << '0'; }
the only diference in those 2 that i see is that in first one u can easy add a debug code or so, if the first "if" is false.Code:if (col == 1) cout << '*'; else if (col == height * 2) cout << '*'; else cout << '0';
is that the only diference and reason that it could make to be better using that style ?(first seems a bit harder to folow but a bit easyer to modifi)



LinkBack URL
About LinkBacks





CornedBee