fork download
  1. #ifndef MIXEDEXPRESSION_H
  2. #define MIXEDEXPRESSION_H
  3. #include<fstream>
  4. using namespace std;
  5.  
  6. class MixedExpression
  7. {
  8. private:
  9. long a, b, c; // Variables of the mixed expression.
  10. long GCD(long, long); // Get the greatest common divisor.
  11. void reduce(void); // Reduce a mixed expression to its normal form.
  12. public:
  13. MixedExpression(); // Default constructor of the mixed expression class.
  14. MixedExpression(long, long, long);
  15. MixedExpression add(MixedExpression op); // Add two numbers.
  16. MixedExpression subtract(MixedExpression op); // Subtract two numbers.
  17. MixedExpression multiply(MixedExpression op); // Multiply two numbers.
  18. MixedExpression divide(MixedExpression op); // Divide two numbers.
  19. void ReadMixedExp(istream &in); // Read each line.
  20. void printData(ostream &out); // Print the result.
  21. };
  22. #endif
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i486-linux-gnu/4.8/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
stdout

Standard output is empty