Quantcast

A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

yogesh_sahu

  • 2 years ago

can any body know design pattern in c++ ??

  • This Question is Closed
  1. goformit100
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    sir plz clear the question to me

  2. kevsturge
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    yep, what do you want to know about them

  3. thangeram
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    which design pattern

  4. yogesh_sahu
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    How to implement singleton design in C++?

  5. kevsturge
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 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; } }

  6. yogesh_sahu
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    thanks kevsturge for replay this is helpfull for me

  7. kevsturge
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ok, if you have any trouble implementing it let me know

  8. oldrin.bataku
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 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 anti-pattern. Be careful in how you apply it.

  9. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

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
  • 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.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.