fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<malloc.h>
  4. #include<string.h>
  5. #define UNCHECKED 0
  6. #define CHECKED 1
  7. #define EMPTYSTACK −1
  8. #define MAXSTACKSIZE 50
  9. #define NOOPERANDS 50
  10. #define NOOPERATORS 50
  11. class SOS
  12. {
  13. public:
  14. int *sos;
  15. int nos;
  16. SOS(int);
  17. void dispSOS();
  18. };
  19. class DFA
  20. {
  21. private:
  22. int maxDFAStates;
  23. int noDFAStates;
  24. int noNFAStates;
  25. int noSymbols;
  26. int nfaStartState;
  27. int nfaFinalState;
  28. int noOperands;
  29. char operands[NOOPERANDS];
  30. int **nfaTransTable;
  31. int **dfaTransTable;
  32. int *dfaStatesChecked;
  33. public:
  34. DFA();
  35. SOS **dfaSOS;
  36. SOS* eClosure(SOS*);
  37. SOS* move(SOS* ss, char b);
  38. void constructSubset();
  39. int isPresent(int a[], int n, int x);
  40. void readNFA(FILE *fp);
  41. void initDFATables();
  42. int findOpdIndex(char r);
  43. void displayNFATransTable();
  44. void displayDFATransTable();
  45. SOS* eClosure(SOS*);
  46. int checkDFAStates(SOS *ss);
  47. int isSOSEqual(SOS *ss1, SOS *ss2);
  48. SOS *sort(SOS *ss);
  49. };
  50.  
  51.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:45:14: error: ‘SOS* DFA::eClosure(SOS*)’ cannot be overloaded
         SOS* eClosure(SOS*);
              ^~~~~~~~
prog.cpp:36:14: error: with ‘SOS* DFA::eClosure(SOS*)’
         SOS* eClosure(SOS*);
              ^~~~~~~~
stdout
Standard output is empty