【发布时间】:2011-11-29 13:46:41
【问题描述】:
我正在从文件中读取简单的字符串,但是当我看到变量值时,我一直看到垃圾 怎么清洗?
string line;
ifstream fp_in; // declarations of streams fp_in and fp_out
fp_in.open("test.txt",std::ios_base::in); // open the streams
if(fp_in.is_open())
{
while ( !fp_in.eof() )
{
getline (fp_in,line,'\n');
...
...
但在“line”字符串的乞求中,我看到了:
ן»¿{"数据":[{"id":"19513xxxx46141_326xxxx15447", ......
我怎样才能摆脱它?
【问题讨论】: