Thanks Kbw. Please have a check
//cpp file
#include "MathFuncsLib.h"
#include "stdafx.h"
#include <stdexcept>
using namespace std;
namespace MathFuncs
{
double MyMathFuncs::Add(double a, double b)
{
return a + b;
}
double MyMathFuncs::Subtract(double a, double b)
{
return a - b;
}
double MyMathFuncs::Multiply(double a, double b)
{
return a * b;
}
double MyMathFuncs::Divide(double a, double b)
{
return a / b;
}
}
//header file
#include "stdafx.h"
namespace MathFuncs
{
class MyMathFuncs
{
public:
// Returns a + b
static double Add(double a, double b);
// Returns a - b
static double Subtract(double a, double b);
// Returns a * b
static double Multiply(double a, double b);
// Returns a / b
static double Divide(double a, double b);
};
}
Error:
Error 2 error C2653 (line 9) : 'MyMathFuncs' : is not a class or namespace name