fork download
  1. #include <complex>
  2. #include <fstream>
  3. #include <iomanip>
  4. #include <iostream>
  5. #include <sstream>
  6. #include <string>
  7. #include <vector>
  8.  
  9. class InputDeck
  10. {
  11. public:
  12. typedef void (*handler)(std::string, int);
  13. static void errorHandler(std::string error, int severity); //Supplies a default error handler
  14. static void warningHandler(std::string error, int severity); //Supplies a default warning handler
  15. handler errorH;
  16. handler warningH;
  17.  
  18. InputDeck(std::string pwd = "", handler eHandler = errorHandler, handler wHandler = warningHandler);
  19. //~InputDeck();
  20.  
  21. bool readFile(std::string filename);
  22. first firstobj;
  23. second secondobj;
  24. friend std::istream& operator>>(std::istream& file, InputDeck& obj);
  25. };
  26. std::istream& operator>>(std::istream& file, InputDeck& obj) {
  27. //stuff
  28. file >> obj.firstobj;
  29. //more stuff
  30. return file;
  31. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty