Variable Declaration & Initialization :: C++

Status
You're currently viewing only Stephan T. Lavavej's posts. Click here to go back to viewing the entire thread.
Not open for further replies.
I like C89, where declarations have to appear at the top. (I believe C99 is like C++ in this respect, though I forget if gcc allows this yet.) I figure, if your function is over a page long anyways (50 lines), it's too big. But yes - always keep declaration as close to usage as possible, and limit its scope as much as possible.
--
Stephan T. Lavavej
http://stl.caltech.edu
 
Status
You're currently viewing only Stephan T. Lavavej's posts. Click here to go back to viewing the entire thread.
Not open for further replies.