posts - 68, comments - 8, trackbacks - 0, articles - 0
  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

std::string vs2008

Posted on 2010-02-25 20:37 Richmond 阅读(868) 评论(2)  编辑 收藏 引用
在VS2008中 发现用了std::string型变量 在自己机器上能运行 而在别人机器上爆 难道是是少了某个文件么,检查中......

Feedback

# re: std::string vs2008  回复  更多评论   

2010-03-04 15:24 by 关注
还有这么诡异的事情,
期待楼主的检查结果

# re: std::string vs2008  回复  更多评论   

2010-03-04 22:21 by Richmond
解决了 楼上欢迎来访,不好意思 没更新博客,解决如下:
比如某个函数形式:void Find(std::string str),然后你想传某字符串如“abc” 如果是:Find("abc") (没用Unicode) 这样就会出错 在自己机子上不会错,但在别人的电脑上会爆。但如果是这样:std::string str = "abc" Find(str) 在别人电脑上就不会爆.不知道为什么。
只有注册用户登录后才能发表评论。