devxlogo

Tip Bank

Zero Sized Arrays?

In standard C++, declaring arrays with zero elements is illegal: int n[0]; //illegal However, certain compilers do support arrays of zero size as non-standard extension. In contrast, dynamic allocation of

Avoid Returning Containers by Value

While the overhead of returning an ordinary object by value may be acceptable in most cases, returning a container by value is much more expensive in terms of performance. For

inline vs. __forceinline

MS Visual C++, as well as several other compilers, now offer non-standard keywords that control the inline expansion of a function, in addition to the standard inline keyword. What are