Skip to content

关于12.20 打印限制条件 #91

@z974890869

Description

@z974890869

我看到答案里用了
bool operator!=(const StrBlobPtr& p) { return p.curr != curr; } 使用 !=
请问如果不用!= ,那么限制条件还可以是什么?
‘’‘
{
StrBlob vs;
//我把代码粘贴到dev中后发现,是在文件路径之前多了一个“?”号。
//解决:用键盘一个个敲进去
ifstream inf("C:/Users/z9748/Desktop/exp_read_ANSI.txt");
string line;
while (getline(inf, line))
{
istringstream stream(line);
string word;
while (stream >> word)
{
vs.push_back(word);
}
}
inf.close();
//打印
for(StrBlobPtr i = vs.begin(); i != vs.end(); i.incr())
{
cout << i.dered() << " ";
}
cout << endl;
}
’‘’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions