fork(1) download
  1. #include <cmath>
  2. #include <cstdio>
  3. #include <vector>
  4. #include <iostream>
  5. #include <algorithm>
  6. using namespace std;
  7.  
  8. class Graph
  9. {
  10. private:
  11. vector<vector<pair<int, int>>> matrix;
  12. public:
  13. Graph() = default;
  14. Graph(size_t nodes, size_t edges);
  15. Graph(size_t nodes, size_t edges, istream &is)
  16. Graph (nodes, edges);
  17. };
  18.  
  19. Graph::Graph (size_t nodes, size_t edges)
  20. {
  21. matrix.resize (nodes);
  22. for (auto &v : matrix)
  23. v.resize (nodes);
  24. }
  25.  
  26. Graph::Graph(size_t nodes, size_t edges, istream &is)
  27. {
  28.  
  29. }
  30.  
  31. int main() {
  32. /* Enter your code here. Read input from STDIN. Print output to STDOUT */
  33. return 0;
  34. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:15:50: error: expected ';' at end of member declaration
     Graph(size_t nodes, size_t edges, istream &is)
                                                  ^
prog.cpp:16:21: error: expected ')' before ',' token
         Graph (nodes, edges);
                     ^
stdout
Standard output is empty