首页 > 其他 > 详细

error C2275: 'SOCKET' : illegal use of this type as an expression

时间:2018-06-27 14:45:45      阅读:272      评论:0      收藏:0      [点我收藏+]

  在VC中编译xxx.c文件出现错误error C2275 illegal use of this type as an expression 

  问题在于C99之前要求所有的声明必须放在函数块的起始部分,这也是C和C++的重要区别。

  方法:

  1). 修改成xxx.cpp 。

  2). 把声明放在函数起始部分。

  参考:http://stackoverflow.com/questions/9549521/compiler-error-c2275

error C2275: 'SOCKET' : illegal use of this type as an expression

原文:https://www.cnblogs.com/MakeView660/p/9233853.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!