Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/147.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 逗号运算符的左操作数是引用,而不是调用_C++ - Fatal编程技术网

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

C++ 逗号运算符的左操作数是引用,而不是调用,c++,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

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

    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]

有什么可能出错的线索吗?

编译器的意思是你可能想要
if(recv(clientWantsFile,MAX_PATH,0)){
。哦,我明白了。谢谢!编译器的意思是你可能想要
if(recv(clientWantsFile,MAX_PATH,0)){
。哦,我明白了。谢谢!