Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

C++ has features in its syntax so that you can write objects that behave like arrays: support [] indexing via operator [], and can be passed around (according to whatever ownershihp discipline you want: duplication, reference counting). C++ provides such objects in its standard library, such as: std::basic_string<T> and std::vector<T>. There is a newer std::array also.


And depending on the compiler they can also bounds check, even in release builds, it is a matter of enabling the right build configuration flags.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: