Are there guidelines concerning stack usage? Stack versus heap?
Unlike Java, C and C++ are able to instantiate a lot more data [objects] on stack. Typically data that has function-body lifetime should be realized on the stack; data that has dynamic extent (i.e. that is returned to calling functions [not by-value] and referenced there) must be allocated on heap. The heap can be used too (the Java way) if there exist [severe] stack size restrictions. Static data should not be applied [in that or other cases], since that makes a function non-reentrant [see question on reentrancy].