提问者:小点点

C++什么意思:返回(*(int*)x-*(int*)x); [已关闭]


谁知道它是什么意思:return(*(int*)x-*(int*)x);我很难理解thx求助


共1个答案

匿名用户

没有更多的语境,无从知晓。 证明:

#include <iostream>

struct Obfuscated {
    operator int*() {
        return &arr[i++];
    }

    int arr[2] { 10, 20 };
    int i = 0;
};

int main()
{
    Obfuscated x;
    std::cout << ( *(int*)x - *(int*)x ) << '\n';
}

指纹-10个或10个。

相关问题


MySQL Query : SELECT * FROM v9_ask_question WHERE 1=1 AND question regexp '(c++|返回|int|x-|int|x|关闭)' ORDER BY qid DESC LIMIT 20
MySQL Error : Got error 'repetition-operator operand invalid' from regexp
MySQL Errno : 1139
Message : Got error 'repetition-operator operand invalid' from regexp
Need Help?