algorithm question

Discussion in 'C++' started by minnew, Mar 31, 2013.

  1. minnew

    minnew Guest

    I looking to design a (graphical) program in which a known path (such as anelectrical circuit) can be interrupted by the user. That is, the user canclick the mouse anywhere on a path to "cut" it so that the path is disabled. Once the path is cut, the item connected to the path reacts (such as a light bulb going out). From a high level point of view, what would be the best code / algorithm to design such an interface?

    thanks
     
    minnew, Mar 31, 2013
    #1
    1. Advertising

  2. On 3/31/2013 6:45 PM, minnew wrote:
    > I looking to design a (graphical) program in which a known path (such
    > as an electrical circuit) can be interrupted by the user. That is,
    > the user can click the mouse anywhere on a path to "cut" it so that
    > the path is disabled. Once the path is cut, the item connected to the
    > path reacts (such as a light bulb going out). From a high level
    > point of view, what would be the best code / algorithm to design such
    > an interface?


    Sorry, I think you're in a wrong newsgroup. Here we talk C++
    *language*. If you have a C++ language problem, post it. If you don't
    know where to begin, there are better places to ask about it than here.
    Perhaps you should look at comp.programming or some physics
    (electricity) newsgroup...

    V
    --
    I do not respond to top-posted replies, please don't ask
     
    Victor Bazarov, Apr 1, 2013
    #2
    1. Advertising

  3. minnew

    Stefan Ram Guest

    minnew <> writes:
    >I looking to design a (graphical) program in which a known
    >path (such as an electrical circuit) can be interrupted by
    >the user. That is, the user can click the mouse anywhere on
    >a path to "cut" it so that the path is disabled. Once the
    >path is cut, the item connected to the path reacts (such as a
    >light bulb going out). From a high level point of view, what
    >would be the best code / algorithm to design such an
    >interface?


    The standard library of C++ does not allow the UI of such a
    program to be written. One needs to employ an additional GUI
    framework or library. The design of the UI code then follows
    the choice of a library. It cannot be designed upfront.

    An algorithm always depends on the operations available. When
    they are not know, one cannot write an algorithm.

    Having said this, it always helps to know MVC when one wants
    to write a GUI program:

    http://en.wikipedia.org/wiki/Model–view–controller

    , and usually one can best design a GUI application after
    having gained experience with several small toy problems
    in GUI programming, i.e., simple exercises.
     
    Stefan Ram, Apr 1, 2013
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ortoped

    Search algorithm question

    ortoped, Aug 19, 2003, in forum: Java
    Replies:
    1
    Views:
    391
    Miguel De Anda
    Aug 19, 2003
  2. Ahmed Moustafa
    Replies:
    0
    Views:
    781
    Ahmed Moustafa
    Nov 15, 2003
  3. Anna Smith

    Graph Algorithm Question

    Anna Smith, Apr 24, 2004, in forum: Java
    Replies:
    2
    Views:
    897
    Mladen Adamovic
    Apr 24, 2004
  4. BlueBall
    Replies:
    12
    Views:
    641
    Dale King
    Apr 15, 2006
  5. Bapaiah Katepalli
    Replies:
    1
    Views:
    1,498
    Mike Treseler
    Jun 23, 2006
Loading...

Share This Page