小编Gal*_*pan的帖子

-1表示的是什么?

我正在使用我的C++类中的自动摘要系统,并且对我正在进行的ASCII比较之一有疑问.这是代码:

    char ch;
    string sentence;
    pair<char, char> sentenceCheck;
    int counter = 0;
    while (!ifs2.eof())
    {
        ch = ifs2.get();
        ch = tolower(ch);

        if (ch == 13)
            ch = ifs2.get();

        if (ch != 10 && ch != '?' && ch != '!' && ch != '.')
            sentence += ch;

        sentenceCheck.first = sentenceCheck.second;
        sentenceCheck.second = ch;

        cout << sentenceCheck.first << "-" << (int)sentenceCheck.first << " ---- " << sentenceCheck.second << "-" << (int)sentenceCheck.second << endl;

        if(sentenceCheck.second == ' ' || sentenceCheck.second == 10 …
Run Code Online (Sandbox Code Playgroud)

c++ ascii

0
推荐指数
1
解决办法
224
查看次数

标签 统计

ascii ×1

c++ ×1