Aahhhhh! Tried compiling this class and the error "Recipe for target 'Calculator.hpp' failed." popped up. It showed a Makefile.win too and it was red on the last line. I use Dev C++.
/**************************************
Calculator.hpp
Class header program for Calculator.cpp
Date created: 17/10/21
Date modified: 17/10/21
Revisions:
1.0 Start editing 17/10/21 (OGA)
**************************************/
#include <iostream>
class Calculator
{
public: //Class definer
int Add(int addend,int addend2)
int Subtract(int subtrahend,int minuend)
int Multiply(int input,int input2)
int Divide(int divid,int divis)
int Bark() //Hold on, Calculators can bark?!
};
int Calculator::Add(int addend,int addend2)
{
return addend+addend2;
}
double calculator::divide( int divid, int divis )
{
return ( divid + 0.0 ) / divis;
}
#include <iostream>
class Calculator
{
private: //Class definer
int Add( int addend, int addend2 );
int Subtract( int minuend, int subtrahend );
int Multiply( int input, int input2 );
double Divide( int divid, int divis );
public:
void Menu();
};
int Calculator::Add( int addend, int addend2 )
{
return addend+addend2;
}
int Calculator::Subtract( int minuend, int subtrahend )
{
return minuend-subtrahend;
}
int Calculator::Multiply( int input, int input2 )
{
return input*input2;
}
double Calculator::Divide( int divid, int divis )
{
return ( divid + 0.0 ) / divis;
}