在实现图像二值化的功能,我一步步添加成员函数、对话框、代码等,什么都弄好了,但是一加上这三行代码就报错,
错误:
error C2065: 'CInpuDlg' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'inputDlg'
error C2065: 'inputDlg' : undeclared identifier
error C2228: left of '.DoModal' must have class/struct/union type
error C2228: left of '.m_nValue' must have class/struct/union type
warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
在网上找了毫不夸张一天都没找到解决方法,已经放弃了一次,这次因为不可抗的因素要重新捡起来,最终找到灵感,
原解决方法是说在原.cpp文件的最上面加上#include "resource.h",但是我加了也还是不行,我就模仿着加了对话框的头文件InpuDlg.h,然后就不报错了*★,°*:.☆( ̄▽ ̄)/$:*.°★* 。
#include "InpuDlg.h"
注意不要直接照搬我的文件名,去fileview视图看自己的头文件名
这段时间真的很痛苦,我就不信别人都能行我就不行,又不是什么多难的东西,终于解决了,就这么一句困扰了我这么久,发出来希望能给有相似困扰的一个参考