tf.*_*.rz 0 c++ compiler-errors header
我有一个名为BottlingPlant的课程.我创建了以下头文件:
#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
Run Code Online (Sandbox Code Playgroud)
以下.cc文件:
#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() {
}
Run Code Online (Sandbox Code Playgroud)
当我尝试编译.cc时,它会在.cc和.h中给出错误:
BottlingPlant::BottlingPlant( Printer &prt, NameServer &nameServer, unsigned int numVendingMachines, unsigned int maxShippedPerFlavour, unsigned int maxStockPerFlavour, unsigned int timeBetweenShipments )
Run Code Online (Sandbox Code Playgroud)
说)在&令牌之前有预期.这对我没有任何意义,因为没有开放(.我只是不确定为什么它会给出这个错误.Printer并且NameServer只是单独的类作为项目的一部分但是..我是否需要包括他们的头文件或否?
任何帮助是极大的赞赏!
| 归档时间: |
|
| 查看次数: |
76 次 |
| 最近记录: |