2 ms·
Eh, An object can expose an array interface or whatever for use in efficient algorithms and reusable libraries. Simple example is how C++ strings have c_str() o
by Evbn 14y ago
Eh, An object can expose an array interface or whatever for use in efficient algorithms and reusable libraries. Simple example is how C++ strings have c_str() or whatever it is called.
- andrewflnr 14y agoI think a more interesting example is how every standard C++ container has the same iterator-based interface for iterating over it.