Created
March 31, 2016 03:45
-
-
Save pycckuu/c21319629e5bf450f889245bf94eade2 to your computer and use it in GitHub Desktop.
method const vs non-const
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
friend void get_edge_value(const Graph &g, int node_x, int node_y){ | |
if (g.mapping[node_x][node_y]==1) { | |
list<Edge>::iterator it; | |
for (it = g.list_of_edges.begin(); it != g.list_of_edges.end(); it++) { | |
if ( (it->begin == node_y && it->end == node_x) || (it->begin == node_x && it->end == node_y)){ | |
cout << it->distance; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment