编译过程出错
当我尝试在 http://www.exploit-db 编译脚本时出现错误。 com/exploits/16/ 。 我正在使用 dev-c++,它告诉我:
(( C:\...\Untitled1.cpp In function `void send_ping_overflow(SOCKET, DWORD, char*, short int)':
|| 104 C:\...\Untitled1.cpp name lookup of `i' changed for new ISO `for' scoping
|| 100 C:\...\Untitled1.cpp using obsolete binding at `i' ))
I have an error when I try to compile the script at http://www.exploit-db.com/exploits/16/ .
I'm using dev-c++ and it tells me this:
(( C:\...\Untitled1.cpp In function `void send_ping_overflow(SOCKET, DWORD, char*, short int)':
|| 104 C:\...\Untitled1.cpp name lookup of `i' changed for new ISO `for' scoping
|| 100 C:\...\Untitled1.cpp using obsolete binding at `i' ))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
for (int i, ...)
变量
i
是在for
循环结构中声明的。这实际上是 C 语言中的一项新功能(相对而言!) - 最初,变量需要在使用它们的块的顶部声明。您正在使用的令人难以置信的过时编译器(请参阅dev-c++ 标签维基页面)向您发出警告这是因为您没有按照 C99 标准或更高版本进行编码。请注意,C99 中的“99”代表 1999 年,即十三年前。你一定是用 C90 写的,大约是二十一年前的事了。
我建议切换到更新/更好的 IDE,例如 Eclipse。
for (int i, ...)
The variable
i
is being declared in thefor
loop construct. This is actually a new (relatively speaking!) ability in the C language - originally, variables needed to be declared at the top of the block in which they were used.The incredibly obsolete compiler you're using (see the dev-c++ tag wiki page) is giving you a warning about this since you're not coding to the C99 standard or later. Note that the '99' in C99 is for 1999, or thirteen years ago. You must be writing in C90, which is from approximately twenty-one years ago.
I suggest switching to a newer/better IDE such as Eclipse.