friend istream & operator >> 在dll中处理不了

atper123456 2010-07-14 09:38:25
我在dll中 friend 根本就用不了,而且 istream也识别不了
>c:\users\ice star\documents\visual studio 2008\projects\string\string\string.h(12) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\users\ice star\documents\visual studio 2008\projects\string\string\string.h(12) : error C2061: 语法错误 : 标识符“ostream”
1>c:\users\ice star\documents\visual studio 2008\projects\string\string\string.h(12) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\users\ice star\documents\visual studio 2008\projects\string\string\string.h(12) : error C2805: 二进制“operator <<”的参数太少
1>c:\users\ice star\documents\visual studio 2008\projects\string\string\string.cpp(102) : error C2143: 语法错误 : 缺少“;”(在“&”的前面)
1>c:\users\ice star\documents\visual studio 2008\projects\string\string\string.cpp(102) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
1>c:\users\ice star\documents\visual studio 2008\projects\string\string\string.cpp(102) : error C2086: “int Stringfuns::istream”: 重定义


都是乱造的错误
...全文
139 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
two_ears 2010-07-14
  • 打赏
  • 举报
回复
这个和是不是dll没有关系吧,如果你的生命就是friend istream & operator >>;那它在exe里同样不行,hoho
DotCpp 2010-07-14
  • 打赏
  • 举报
回复
应该是头文件的问题
xsh_123321 2010-07-14
  • 打赏
  • 举报
回复
dll中可以正常使用friends,istream, 你把代码贴上来,看看头文件,命名空间对不对。。。。

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧