Guest User

GraphClass.h

a guest
Jul 20th, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. /*
  2. This file contains the declaration of the class and its memebres
  3. http://stackoverflow.com/questions/12733888/regarding-c-include-another-class
  4. Directed graphs
  5. */
  6.  
  7. #include <list>
  8. using namespace std;
  9. class Graph
  10. {
  11.  
  12.     int v;
  13.     std::list<int> *adj;            // pointer to array who contains list of ints
  14. public:
  15.     Graph(int v);               // This constructor is used to intilaize the graphs vertyices and arrau
  16.     ~Graph();
  17.     void addEdge(int src,int dest);
  18.     void BFS(int src);
  19. };
Advertisement
Add Comment
Please, Sign In to add comment