Click here to Skip to main content
15,881,248 members
Articles / Programming Languages / C++

Two-thirds of a pimpl and a grin

Rate me:
Please Sign up or sign in to vote.
4.74/5 (14 votes)
5 Jun 2014CPOL9 min read 90.1K   124   31  
An article on a quasi-pimpl, as well as a neat global object manager.
#pragma once

class Object {
   public:
      static int numConstructsC;
      static int numDestructsC;

      Object() {
         numConstructsC++;
         }
      ~Object() {
         numDestructsC++;
         }
      };

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer www.randommonkeyworks.com
United States United States
I am the author of Laughing at the Devil: One Man’s Religious Discoveries. If you want to understand the astronomic investigations of our priests 3,000 years ago, LATD is the book to turn to. It opens up the thoughts that pushed them away from their earlier polytheism and towards our current definition of God.

Trained as a mechanical engineer, I have been involved with design, supervision, and project management. I taught myself C++ programming in order to play around with binaural beats more easily. I've also created various databases to help with project management and personal tasks.

Databases are cool and extremely useful! Happy coding, everybody!

Comments and Discussions