I was wondering what difference between
vector<StructName*>Variablename_; and vector<StructName>* Variablename_;
For example, let's say I have a class Path and inside I have a struct vertices:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
class Path{
Public:
//functions
Private:
struct Vertices{
int vertex;
bool visit;
int weight;
Vertices* path;
}
vector<Vertices*>node;
}
|
Last edited on
Last edited on
So if I am trying to make an adjacency list using a vector
vector<StructName*>Variablename_; would be the way to do. right?
IS there a way I can visualize this? I think I am a little confused
Last edited on