I have a class called BottlingPlant. I created the following headerfile:
#ifndef __BOTTLINGPLANT_H__
#define __BOTTLINGPLANT_H__
#include <iostream>
class BottlingPlant {
public:
BottlingPlant( Printer &prt, NameServer &nameServer, unsigned int numVendingMachines, unsigned int maxShippedPerFlavour, unsigned int maxStockPerFlavour, unsigned int timeBetweenShipments );
void getShipment( unsigned int cargo[ ] );
void action();
};
#endif
And the following .cc file:
#include <iostream>
#include "PRNG.h"
#include "bottlingplant.h"
BottlingPlant::BottlingPlant( Printer &prt, NameServer &nameServer, unsigned int numVendingMachines, unsigned int maxShippedPerFlavour, unsigned int maxStockPerFlavour, unsigned int timeBetweenShipments ) {
}
void BottlingPlant::getShipment( unsigned int cargo[ ] ) {
}
void BottlingPlant::action() {
}
When I try compiling the .cc, it gives me an error in the .cc and .h at the line:
BottlingPlant::BottlingPlant( Printer &prt, NameServer &nameServer, unsigned int numVendingMachines, unsigned int maxShippedPerFlavour, unsigned int maxStockPerFlavour, unsigned int timeBetweenShipments )
Saying that there is an expected )
before the &
token. This doesn't make any sense to me as there is no open (
. I'm just not sure why it's giving this error. Printer
and NameServer
are just separate classes a part of the project but.. do I need to include their header files as well or no?
Any help is greatly appreciated!