Hi, I was wondering if the atomic types in C++ have constructors and destructors?
Hi, I was wondering if the atomic types in C++ have constructors and destructors?
Do you mean automatic, I have never heard of atomic types.
By "atomic types" I take it that you mean the integral types like int and char. If so, then I say yes.
Code:int x; // uses default constructor int y(0); // uses copy constructor
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.
Yeah, I mean the built-in keyword types where you put "int" or "char" for instance. Thanks for the replies.
You're welcome :-)
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.