Visual Studio 警告 C4133
在 Visual Studio 2005 中收到奇怪的警告:
警告 C4133: '=' : 不兼容的类型 - 从 'PointNode *' 到 'PointNode *'
结构定义:
struct PointNode {
int x;
int y;
struct PointNode *next;
};
声明和用法:
struct PointNode* pPointHead;
...
pPointHead = pPointHead->next;
警告本身说它们是相同的类型,为什么会抱怨?
(不幸的是我无法标记C4133)
getting a weird warning in Visual Studio 2005:
warning C4133: '=' : incompatible types - from 'PointNode *' to 'PointNode *'
struct definition:
struct PointNode {
int x;
int y;
struct PointNode *next;
};
declaration and usage:
struct PointNode* pPointHead;
...
pPointHead = pPointHead->next;
The warning itself says they are the same types, why would it complain?
(unfortunately i can't tag C4133)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的结构应如下所示:
声明和使用如下:
当您添加 struct 关键字时,编译器认为您正在声明一个具有相同名称的新的不同结构。
Your struct should look like this:
Declare and use like this:
When you add the struct keyword, the compiler thinks that you are declaring a new different struct with the same name.