Lets say I have this class:
假设我有这门课:
struct testy {
std::array<int, 10> data;
float operator[] (int idx) const { return 1 / data[idx]; }
float &operator[](int idx) { return ??? }
};
structLets say I have this class:
假设我有这门课:
struct testy {
std::array<int, 10> data;
float operator[] (int idx) const { return 1 / data[idx]; }
float &operator[](int idx) { return ??? }
};
struct