Hi,
How can I define a class which I declared in other class? I have such example:
And I would like to only declare class bad_size in class graph:Code:class graph { private: int **w; // w[i][v] - the weight of the edge from vertex i to v public: int vertex_number; class bad_size { private: int size; public: bad_size(int); }; graph(int); int edge_u_v(int,int); };
And define it somewhere else. I tried do this like defining methods:Code:class graph { private: int **w; // w[i][v] - the weight of the edge from vertex i to v public: int vertex_number; class bad_size; graph(int); int edge_u_v(int,int); };
but that's wrong... How can I do that correct?Code:class graph::bad_size { ... }
Regards.



LinkBack URL
About LinkBacks


