Possible Duplicate:
How do I prevent a class from being allocated via the 'new' operator? (I'd like to ensure my RAII class is always allocated on the stack.)
For C++, how to enforce that classes's instances only be allocated on the stack, but not on the heap, at compile-time?
I think all data members and functions are allocated in stack unless they are declared by new operator.
right ?
Any help is really appreciated.