for(auto it = begin(arry);it != end(arry);it ++ ){} auto it = begin(arry); while (it != end(arry)) { *it = toupper(*it++); /* 是未定义行为(两端都用到了而且右端还改变了它的值),因为你无法知道是先计算的左边还是右边 *it = toupper(*it) or *(it+1) = toupper(*it) */ }
原文:http://www.cnblogs.com/Przz/p/6413357.html