fork(2) 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. void reduce(void); // Reduce a mixed expression to its normal form.
  11. public:
  12. MixedExpression(); // Default constructor.
  13. MixedExpression(long, long, long); // Normal constructor.
  14. MixedExpression add(MixedExpression op); // Add two mixed expressions.
  15. MixedExpression subtract(MixedExpression op); // Subtract two mixed expressions.
  16. MixedExpression multiply(MixedExpression op); // Multiply two mixed expressions.
  17. MixedExpression divide(MixedExpression op); // Divide two mixed expressions.
  18. void ReadMixedExp(istream &in); // Read each line.
  19. void printData(ostream &out); // Print the result.
  20. };
  21. #endif
  22.  
  23.  
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