In my object ' handler ' I have the following code:
Product tempProduct; // temporary Product storage variable
LINE481 tempProduct.setHandler(this);
Within my Product.h:
#include <string>
#include <qtimer.h>
#include "HandleTCPClient.h"
#ifndef PRODUCT_H
#define PRODUCT_H
class Handler;
//Define ourselves a product class
class Product
{
void startTimer();
public:
Product();
string seller, itemName, description, highestBidder;
double price, min, buyingPrice, currentBid;
int time;
bool isSold;
Handler handler();
void setHandler(Handler h);
public slots:
void setProductToSold();
};
#endif
For my Product.cpp:
#include <string>
using std::string;
#include "Product.h"
Product::Product()
{
seller = "";
itemName = "";
price = 0.00;
min = 0.00;
buyingPrice = 0.00;
time = 0;
description = "";
highestBidder = "None";
currentBid = 0.00;
}
void Product::setHandler(Handler h)
{
handler = h;
}
The issue I am having:
HandleTCPClient.cpp: In member function âint Handler::HandleTCPClient(int, std::string, std::string)â:
HandleTCPClient.cpp:481: error: no matching function for call to âProduct::setHandler(Handler* const)â
Product.h:34: note: candidates are: void Product::setHandler(Handler)