Trying to get this to compile is driving me nuts! Any help is greatly appreciated. I think it's having trouble linking the header to the .cpp files. It's my first program in Dev C++ - I'm used to using Visual Studio.
Here's the source for the header header:
#include <iostream>
#include <stdlib.h>
#include "SmpMth.h"
using namespace std;
int SmpMth::Add(int a, int b)
//Postcondition:
// The sum of two ints is returned
{
return a+b;
}
int SmpMth::Max(int a, int b)
//Postcondition:
// The maximum of two ints is returned
{
if(a>b)
{
return a;
}
else
return b;
}
int SmpMth::Min(int a, int b)
//Postcondition:
// The minimum of two ints is returned
{
if(a<b)
return a;
else
return b;
}
and here's the header:
#include <iostream>
#include <stdlib.h>
using namespace std;
class SmpMth
{
public:
int Add(int, int);
int Max(int, int);
int Min(int, int);
SmpMth();
SmpMth(int, int);
private:
};
Thanks in advance for any help,
Nate