紧急求助!!!C++编译的问题,在线等!

lhbyron 2003-09-12 12:44:28
我用g++编译一段程序,但是出现如下错误:
g++ -fpermissive -O2 -w -pipe -c cryptlib.cpp
cryptlib.cpp: In member function `virtual long unsigned int
CryptoPP::BufferedTransformation::MaxRetrievable() const':
cryptlib.cpp:169: no matching function for call to `
CryptoPP::BufferedTransformation::CopyTo(CryptoPP::BitBucket) const'
cryptlib.h:318: candidates are: virtual long unsigned int
CryptoPP::BufferedTransformation::CopyTo(CryptoPP::BufferedTransformation&,
long unsigned int) const
cryptlib.cpp: In member function `virtual unsigned int
CryptoPP::BufferedTransformation::Get(byte*, unsigned int)':
cryptlib.cpp:196: no matching function for call to `
CryptoPP::BufferedTransformation::TransferTo(CryptoPP::ArraySink, unsigned
int&)'
cryptlib.h:312: candidates are: virtual long unsigned int
CryptoPP::BufferedTransformation::TransferTo(CryptoPP::BufferedTransformation&,
long unsigned int = 0ffffffff)



CryptoPP是名字空间,CopyTo,TransferTo都有实现和定义,但是不知为何老是说不匹配?

难道g++不支持默认参数?但是我改掉了,好像也不行,请各位高手指教!!!

CopyTo,TransferTo的原型如下:
virtual unsigned long CopyTo(BufferedTransformation &target, unsigned long copyMax=ULONG_MAX) const;

virtual unsigned long TransferTo(BufferedTransformation &target, unsigned long transferMax=ULONG_MAX);
...全文
25 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yudehui 2003-11-08
  • 打赏
  • 举报
回复
学习
Wolf0403 2003-09-12
  • 打赏
  • 举报
回复
no matching function for call to 'CryptoPP::BufferedTransformation::CopyTo(CryptoPP::BitBucket) const'
你的 CryptoPP::BitBucket 和 BufferedTransformation 是什么关系?

no matching function for call to 'CryptoPP::BufferedTransformation::TransferTo(CryptoPP::ArraySink, unsigned int&)'
你的 CryptoPP::ArraySink 和 BufferedTransformation 又是什么关系?

参数类型不匹配啊
lhbyron 2003-09-12
  • 打赏
  • 举报
回复
to: bigbigbigsoft(bigbigbigsoft)
能否详细说明一下,谢谢!
bigbigbigsoft 2003-09-12
  • 打赏
  • 举报
回复
Essential C++里面有类似问题的说明,你可以好好看看
lhbyron 2003-09-12
  • 打赏
  • 举报
回复
BTW:该段代码在windows下用vc编译是没有问题的
lhbyron 2003-09-12
  • 打赏
  • 举报
回复
bitbucket和ArraySink都是BufferedTransformation 的派生类,
herrycsdn 2003-09-12
  • 打赏
  • 举报
回复
up

64,654

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧