No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi all, class A { public: A(); ~A(); } class B { public: B(); ~B(); private: A *a; ->declares a pointer to class A object A a; -> holds the class A object } Whats the difference between the 2 type of declaration of a class A instance? Are there … | |
Hi all, I have been reading on the net searching for what others alternatives do i have besides singleton and i came across the following site:- [URL="http://www.bigroom.co.uk/blog/better-without-singletons"]http://www.bigroom.co.uk/blog/better-without-singletons[/URL] There is a paragraph stating:- [B]To accomplish this(singleton effect), create the class as a normal, non-singleton, class and enforce the single-instance only behaviour … | |
Hi all, I am quite confused about the usage of both. Both of them seems to enable a variable to be shared consistently between classes. Is the following true? [B]Namespace[/B]-used for defining some constant values that you want to share in your application. [B]Static variable[/B]-used to maintain a consistent value … |