Is it better to use #define or const int for constants?
It's important to note that const int does not behave identically in C and in C++, so in fact several of the objections against it that have been alluded to in the original question and in Peter Bloomfields's extensive answer are not valid:


In C++, const int constants are compile time values and can be used to set array limits, as case labels, etc.
const int constants do not necessarily occupy any storage. Unless you take their address or declare them extern, they will generally just have a compile time existence.


However, for integer constants, it might often be preferable to use a (named or anonymous) enum. I often like this because:


It's backward compatible with C.
It's nearly as type safe as const int (every bit as type safe in C++11).
It provides a natural way of grouping related constants.
You can even use them for some amount of namespace control.


So in an idiomatic C++ program, there is no reason whatsoever to use #define to define an integer constant. Even if you want to remain C compatible (because of technical requirements, because you're kickin' it old school, or because people you work with prefer it that way), you can still use enum and should do so, rather than use #define.