I'm new to c++ and using eclipse cdt on ubuntu and getting this error in my header file:
initializing argument 1 of 'std::map<basic_string<char>,Supplier*> Engine::processSupplierFile(char*)' [-fpermissive]
I already searched for this error and found this: Why am I getting error: initializing argument 1 of 'Item::Item(int)' [-fpermissive] in Eclipse when I try to compile my C++ code?
but it didn't have any answers about the header file error.
here is the code of the header file: (Supplier is a simple object containing two string and a double)
#ifndef Engine_H_
#define Engine_H_
#include "Ingredient.h"
#include "Product.h"
#include "Supplier.h"
#include <stdio.h>
#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include <map>
#include <algorithm>
#include <vector>
using namespace std;
class Engine {
public:
    Engine();
    virtual ~Engine();
    string fileToString(string fileName);
    void processLoggerFile (char* fileName);
    string fileToString(char* fileName);
    vector<Product> processProductsFile(char* fileName, const map<string, Ingredient> &cheapestIngredients); 
    map<string, Supplier*> processSuppliersFile(char* fileName); // this line produces the error
    map<string, Ingredient> findCheapestPrices(vector<Supplier> &suppliers);
    map<string, Product*> createMenu(vector<Product>& products);
    void supplierPriceChange(vector<Product>& products, map<string,Product*>& menu,vector<Supplier>& suppliers, map<string, Ingredient> cheapestIngredients, string supName, string ingName, double newPrice);
};
#endif /* Engine_H_ */
Does anyone knows what is causing this error? thanks in advance
EDIT (supplier.h added)
/*
 * Supplier.h
 *
 *  Created on: Nov 10, 2013
 *      Author: tom
 */
#ifndef SUPPLIER_H_
#define SUPPLIER_H_
#include <string>
using namespace std;
class Supplier {
public:
    Supplier();
    Supplier(const Supplier& supplier);
    Supplier(string supName, string ingName, double price);
    Supplier& operator=(const Supplier& supplier);
    virtual ~Supplier();
    string getSupplierName() const;
    string getIngredientName() const;
    double getPrice() const;
    void setPrice(double price);
private:
    string _ingredientName;
    string _supplierName;
    double _price;
};
#endif /* SUPPLIER_H_ */
 
    