error C2280: : attempting to reference a deleted function

class CMixMinNotes : public CMix
{
public:
#define CMIXMINNOTES_NAME ("Minimum Notes")
#define CMIXMINNOTES_MIX_NUMBER (1)

CMixMinNotes(): CMix( Algorithm, MinBills, CMIXMINNOTES_NAME ){};

CDenomination Calculate( ULONG Amount, unsigned int Currency,
unsigned int NumCashUnits, const CCashUnit CashUnits[], unsigned int MaxNumNotes ) const;

bool Load( ifstream LoadFile ){ return( CMix::Load( LoadFile ) ); };
bool Store( ofstream StoreFile )const{ return( CMix::Store( StoreFile ) ); } ;

private:
bool CalculateR( ULONG Amount, unsigned int Currency, unsigned int LastCashUnit,
unsigned int NumCashUnits, const CCashUnit CashUnits[], bool CassetteUsedForMix[],
CDenomination *RetDenomination ) const;

};
编译时
bool Load( ifstream LoadFile ){ return( CMix::Load( LoadFile ) ); };
bool Store( ofstream StoreFile )const{ return( CMix::Store( StoreFile ) ); } ;
出现错误
error C2280: 'std::basic_ifstream<char,std::char_traits<char>>::basic_ifstream(const std::basic_ifstream<char,std::char_traits<char>> &)' : attempting to reference a deleted function

没仔细看哈,可以说说看到的问题。ifstream和ofstream我记得复制构造函数是私有并且没实现的,传引用吧还是
bool Load( ifstream &LoadFile ){ return( CMix::Load( LoadFile ) ); };像这样。基类也这么改,应该就没问题了追问

不行的

追答

source code给我看看哇

温馨提示:答案为网友推荐,仅供参考