no matching function for call : <p>i am new to c++ and i am currently trying to write a program that uses main to call functions which are seperately written and i tried to write the definitions for the header file declarations and i am getting errors with some functions which i have marked in the code</p>

<p>Store.hpp</p>

<pre><code>#ifndef STORE_HPP

#define STORE_HPP
class Product;
class Customer;
#include&lt;string&gt;

#include "Customer.hpp"
#include "Product.hpp"
class Store

{

private:

std::vector&lt;Product*&gt; inventory;

std::vector&lt;Customer*&gt; members;


public:

void addProduct(Product* p);

void addMember(Customer* c);

Product* getProductFromID(std::string);

Customer* getMemberFromID(std::string);

void productSearch(std::string str);

void addProductToMemberCart(std::string pID, std::string mID);

void checkOutMember(std::string mID);

};

#endif
</code></pre>

<p>i am having trouble writing the code for that function help me</p>

<p>store.cpp</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string.h&gt;
#include "Customer.hpp"
#include "Store.hpp"
#include "Product.hpp"
using namespace std;

string id;

void Store::addProduct(Product* p)       //error 1 no matching function
{

    Product* p(std::string id, std::string t, std::string d, double p, int qa);
    inventory.push_back(p);
}

void Store:: addMember(Customer* c)
{
    members.push_back(c-&gt;getAccountID());
}

Product*  Store::getProductFromID(std::string id)
{
    for(int i = 0; i &lt; inventory.size(); i++)
    {
        Product* p=inventory.at(i);
        if(p-&gt;getIdCode()= id)
        {
            return p;
        }
}
    return NULL;
}
Customer* Store:: getMemberFromID(std::string id)
{
    for(int i = 0; i &lt; members.size(); i++)
    {
        Customer* c = members.at(i);
        if(c-&gt;getAccountID() == id)
        {

            return c;
        }
    }
    return NULL;
}
void std::Store productSearch(std::string str)
{
    for(int i = 0; i &lt; inventory.size(); i++)
    {
        if(inventory[i] == str)
        {
            Product stud(inventory[i],inventory[i+1],inventory[i+2],inventory[i+3],inventory[i+4]);
cout&lt;&lt;getIdCode();

cout&lt;&lt;getTitle();

cout&lt;&lt;getDescription();

cout&lt;&lt;getPrice();

cout&lt;&lt;getQuantityAvailable();
        }
    }
}
void addProductToMemberCart(std::string pID, std::string mID)
{
    cout&lt;&lt;"adding to cart"&lt;&lt;endl;
    getMemberFromID(mID)-&gt;addProductToCart(pID);  

}

void checkOutMember(std::string mID)
{
    Customer* c=getAccountID(mID)
    mID=getMemberFromID(std::string mID);
    if(mID=="NULL")
    {
        cout&lt;&lt;mID&lt;&lt;"is not found"&lt;&lt;endl;
    }

}
</code></pre>

<p>customer.hpp</p>

<pre><code>#ifndef CUSTOMER_HPP

#define CUSTOMER_HPP

#include&lt;vector&gt;

#include "Product.hpp"

class Customer

{

private:

std::vector&lt;std::string&gt; cart;

std::string name;

std::string accountID;

bool premiumMember;

public:

Customer(std::string n, std::string a, bool pm);

std::string getAccountID();

//std::vector getCart();

void addProductToCart(std::string);

bool isPremiumMember();

void emptyCart();

};

#endif
</code></pre>

<p>product.hpp</p>

<pre><code>#ifndef PRODUCT_HPP

#define PRODUCT_HPP

#include&lt;vector&gt;

class Product

{

private:

std::string idCode;

std::string title;

std::string description;

double price;

int quantityAvailable;

public:

Product(std::string id, std::string t, std::string d, double p, int qa);

std::string getIdCode();

std::string getTitle();

std::string getDescription();

double getPrice();

int getQuantityAvailable();

void decreaseQuantity();

};

#endif
</code></pre>
