指针在C和C++的微妙区别
巴扎黑
巴扎黑 2016-11-08 15:55:36

在C语言中,对于指针,有效而正确的用法是保证他指向同一数组的元素或数组最后一个元素后端的元素(past-end-one),但在C++中由于“逆迭代器”的引入,只是他可以指向数组第一个元素前一端的元素(past-start-one).如:rend()== begin()-1;我想问的是为什么他要这样设计,打破C语言习惯有什么更大的好处

巴扎黑
巴扎黑

Popular topics
More>
Latest downloads
More>
web effects
Website source code
Website materials
Front end template
About us Disclaimer Sitemap
PHP Chinese website:Public welfare online PHP training,Help PHP learners grow quickly!