目前共有1篇帖子。
【解决办法】C++的string对象无法用cout输出的解决办法
1樓 巨大八爪鱼 2016-1-3 14:26
在文件头部加上#include <string>即可。

// inserting strings into output streams
#include <iostream>
#include <string>

main ()
{
  std::string str = "Hello world!";
  std::cout << str << '\n';
  return 0;
}

回復帖子

內容:
用戶名: 您目前是匿名發表
驗證碼:
 
 
©2010-2025 Arslanbar [手機版] [桌面版]
除非另有聲明,本站採用創用CC姓名標示-相同方式分享 3.0 Unported許可協議進行許可。