Yinzhien 2021-12-27 13:43 采纳率: 87.5%
浏览 109
已结题

'clear' : is not a member of “X”,该如何解决(语言-c++)

以下是问题报错
--------------------Configuration: 课设 - Win32 Debug--------------------
Compiling...
工资管理系统.cpp
c:\课设\工资管理系统.cpp(148) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(377) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(387) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(512) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(524) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(561) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(621) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(631) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(708) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(909) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(1047) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(1115) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
c:\课设\工资管理系统.cpp(1248) : error C2039: 'clear' : is not a member of 'basic_string<char,struct std::char_traits<char>,class std::allocator<char> >'
执行 cl.exe 时出错.

工资管理系统.obj - 1 error(s), 0 warning(s)

  • 写回答

1条回答 默认 最新

  • 书山客 2021-12-27 15:33
    关注

    根据报错提示应该是你调用的方法不在类中,方便的话把代码贴出来看下

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 1月4日
  • 已采纳回答 12月27日
  • 创建了问题 12月27日

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看