error C2511的一个很怪异的问题

David_7678 2007-12-28 11:33:56
说一下问题的现象:

本来一切正常,向视图类加入#include "CMPJPEGCodec.h"后,编译提示:
coolmpexview.cpp(709) : error C2511: 'my_SetBMPINFO' : overloaded member function 'void (struct tagBITMAPINFOHEADER *,long,long,int,unsigned short,int)' not found in 'CCoolMPExView'
e:\work\2007-12\coolmpex\coolmpexview.h(16) : see declaration of 'CCoolMPExView'

把这个头文件去掉后,又没问题了。我检查了,没有拼写等低级错误。

btw,这个头文件在doc类里include了一次,没有发现错误。

很是怪异,看半天了,没有一点头绪,哥几个帮忙分析一下。谢谢!
...全文
993 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
iyranly 2007-12-28
  • 打赏
  • 举报
回复
错误说得很明白了,你的'CCoolMPExView' 类中没有定义这个成员函数。

'identifier' : overloaded member function not found in 'class'

The specified function was not declared for the given parameters. In all the versions of the overloaded function, none of them had the same parameters in the same order as specified in the erroneous function call.

This error can be caused by a mismatch in the parameter list of the specified function.

解决方法:
Ensure that the correct arguments are being passed when calling the function.

Make sure the arguments are in the correct order when calling the function.

Make sure the argument names are spelled correctly.
michaelru 2007-12-28
  • 打赏
  • 举报
回复
CMPJPEGCodec.h内容贴来看看
shakaqrj 2007-12-28
  • 打赏
  • 举报
回复
我觉得编译错误不难察
实在不行发给我
shakaqrj@yahoo.com.cn
David_7678 2007-12-28
  • 打赏
  • 举报
回复
单位网络不好,没想到发了这么多份,惭愧。。。
pig_2000 2007-12-28
  • 打赏
  • 举报
回复
my_SetBMPINFO函数在CCoolMPExView类中没定义。
看看你的返回值类型是否一样。
缺省的情况是int,不是void

16,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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