逗号运算符的左操作数是引用,而不是调用

时间:2016-10-24 03:59:49

标签: c++

创建一个套接字程序,我在这里收到一些警告。不确定问题是什么:

    if (recv, clientWantsFile, MAX_PATH, 0) {
        ifstream file (clientWantsFile);

        if (file.is_open()) {
            send(Sub, "yes", MAX_PATH, 0);
        } else {
            send(Sub, "no", MAX_PATH, 0);
        }

        // Gets the size of the file requested
        fileSize = file.tellg();
    }

警告:

warning: left operand of comma operator is a reference, not call, to function 'recv' [-Waddress]
warning: left operand of comma operator has no effect [-Wunused-value]
warning: right operand of comma operator has no effect [-Wunused-value]

有什么可能出错的线索?

0 个答案:

没有答案