函数已经有一个正文错误代码C2084

时间:2016-11-08 05:10:37

标签: compiler-errors composition

我正在尝试使用Stock对象作为BuyOrder类的成员。当我为BuyOrder实现构造函数时,它显示函数'BuyOder :: BuyOrder(double,int,Stock)'已经有一个正文。有什么帮助吗?

 BuyOrder::BuyOrder(double price, int quantity, Stock s)
 :buyPrice{ price },
  buyQuantity{quantity},
  buyStock{s}{}

在头文件中,构造函数原型是

BuyOrder(double price, int quantity, Stock s) {} 

0 个答案:

没有答案