Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing

This Question is Closed

goformit100Best ResponseYou've already chosen the best response.0
sir plz clear the question to me
 one year ago

kevsturgeBest ResponseYou've already chosen the best response.0
yep, what do you want to know about them
 one year ago

thangeramBest ResponseYou've already chosen the best response.0
which design pattern
 one year ago

yogesh_sahuBest ResponseYou've already chosen the best response.0
How to implement singleton design in C++?
 one year ago

kevsturgeBest ResponseYou've already chosen the best response.0
The synchronize C++ attribute implements support for synchronizing the target method of an object. Synchronization allows multiple objects to use a common resource (such as a method of a class) by controlling the access of the target method. public class Singleton { private static Singleton instance = null; private Singleton() { } public static synchronized Singleton getInstance() { if (instance == null) { instance = new Singleton(); } return instance; } }
 one year ago

yogesh_sahuBest ResponseYou've already chosen the best response.0
thanks kevsturge for replay this is helpfull for me
 one year ago

kevsturgeBest ResponseYou've already chosen the best response.0
ok, if you have any trouble implementing it let me know
 one year ago

oldrin.batakuBest ResponseYou've already chosen the best response.0
Disregard kevsturge's response as he targets Java, not C++, as evident by both his mentioning of a synchronized keyword and the code he posted. A C++ singleton pattern implementation can be found here: http://stackoverflow.com/a/1008289/591495 Note, however, that in most contexts, the singleton is actually viewed as an antipattern. Be careful in how you apply it.
 one year ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.