Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Foo
- {
- unsigned short x;
- }
- // elsewhere
- inline Foo * Bar::operator [](int i)
- {
- // this->data is (unsigned short *)
- return reinterpret_cast<Foo *>(&data[i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement