为什么Visual C++正在更改我的方法的名称
Why is Visual C++ changing the name of my method?
我对以下代码有问题:
class MainWindow
{
...
private:
bool CreateWindow(std::string, int, int, int, bool);
...
}
和
bool MainWindow::CreateWindow(std::string title, int width, int height,
int bits, bool fullscreen)
{
...
Visual Studio使用以下错误突出显示方法定义:
int reateWindow(std::string title, int width, int height, int bits, bool fullscreen)
Error: class "MainWindow" has no member called "CreateWindowExW"
编译器输出以下内容:
warning C4003: not enough actual parameters for macro 'CreateWindowW'
error C2039: 'CreateWindowExW' : is not a member of 'MainWindow'
我注意到,如果我将方法名称更改为其他名称,而不是以大写C开头,错误就会消失。我是Windows开发的新手。什么东西?
这只是因为CreateWindow
是Microsoft创建的宏。。。它在WinUser.h
中定义。
相关文章:
- 如何重写全局方法名称以在调用原始方法之前将我的代码推到前面
- 我的模板类方法返回错误类型?
- 我无法使用C++指针指向类方法返回的 std::vector
- 查找定义我的 C/C++ 函数/宏的文件比'grep'更简单的方法
- 为什么我的 setter 方法会产生错误的访问错误
- 为什么我的子集和方法不正确?
- 有什么方法可以检测我的类的对象是否在堆栈上创建
- 我无法重写基类的方法,因为我的派生类是模板化的
- 我不确定如何引用此神经网络训练方法中的权重
- 为什么在我的代码中没有调用 g 模拟方法
- 为什么 constexpr 假设我的方法就是 const
- 当我的结构中的任何变量发生更改时触发的事件的任何方法
- 是否有其他方法将.dll文件从一个项目复制到我的启动项目中的可执行文件旁边
- 我的数据结构的最佳序列化方法
- 我的私有方法如何在C++中访问公共枚举
- 我如何确保从我的派生类中调用纯虚拟方法
- 我的链接列表反向递归方法的代码的问题是什么?
- 调用'maps::size(char [20], char&)'没有匹配函数,但我认为我的方法有
- 我的重载后增量方法无法按预期工作。为什么?
- 如何在我的源代码中找到所有发生的情况,其中std :: string被传递给方法作为副本而不是恒定引用