小编lia*_*ang的帖子

错误C2679:二进制'<<':找不到运算符,它接受类型为"std :: string"的右侧操作数

码:

    #include "stdafx.h"
    #include <iostream>
    #include <fstream>
    #include <string.h>

    using namespace std;
    int main()
        {
            ifstream fin ("ride.in.txt");
            ofstream fout ("ride.out.txt");
            int ta, tb;unsigned int i;
            ta = tb = 1;
            string a, b;
            fin >> a >> b;
            for (i = 0; i < a.size(); i++)
                ta = ta * (a[i] - 'A' + 1) % 47;
            for (i = 0; i < b.size(); i++)
                tb = tb * (b[i] - 'A' + 1) % 47;
            if (ta == …
Run Code Online (Sandbox Code Playgroud)

c++ string io operators

-1
推荐指数
2
解决办法
1万
查看次数

标签 统计

c++ ×1

io ×1

operators ×1

string ×1