Help creating a graph class

Posted on 2005-04-13
Last Modified: 2010-04-24
Hello Experts:

I would like for somebody to point me in the right direction on how to develop a graph class. I am to do a program that will read a series of vertices and edges in order to perform operations on a graph, such as topological sorting, find shortest path, and others... I want for guidance on how to develop such class. I am just a bnit lost, and some ideas would help a lot.

Question by:gjgomez
    1 Comment
    LVL 48

    Accepted Solution


    This article contains good description of graphs, data structures representing graphs, and algorithms like finding shortest path. Sample code is in C#.
    If you want to write in managed C++, converting of this code is straightforward (it can also be used directly fron managed C++ application). If you are working in unmanaged C++, you can still use this article and sample code as prototype for yur own application.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now