Any help on why I am getting a 'C2011 'Transaction':'class' type redefinition
? I'm sure it's glaringly obvious but I cannot for the life of me figure it out. Please help.
transaction.h
#include <string>
class Transaction
{
private:
int amount;
std::string type;
public:
Transaction(int amt, std::string kind);
std::string Report();
};
transaction.cpp
#include "transaction.h"
using namespace std;
Transaction::Transaction(int amt, std::string kind):amount(amt), type(kind)
{
}
string Transaction::Report()
{
string report;
report += " ";
report += type;
report += " ";
report += to_string(amount);
return report;
}