• 4618阅读
  • 2回复

[建议]第二版 第11章 P212最后一句貌似翻译有点问题 [复制链接]

上一主题 下一主题
离线冒冒大虾
 
只看楼主 倒序阅读 楼主  发表于: 2012-02-13
书中原句是“在循环体外定义迭代变量只对那些支持含有一个逗号的数据类型的容器类才适用”

原版的句子是 "Defining the iteration variable outside the loop is the only option for containers
that hold data types that contain a comma”

所以我的理解是 含有一个逗号的数据类型的容器类只能在循环体外定义迭代变量

书中的句子会让人觉得 不含逗号数据类型的容器类就不能在循环体外定义迭代变量了

而且foreach的帮助文档里也有这么一句:Unless the data type contains a comma (e.g., QPair<int, int>), the variable used for iteration can be defined within the foreach statement

以上是我的一些看法
离线yfx2003

只看该作者 1楼 发表于: 2012-05-08
正解,谢谢,赞一个
www.qtcn.org/gpq4/
ajaxref.okajax.com/
离线thunny
只看该作者 2楼 发表于: 2012-05-16
楼主看的是很仔细啊!学习中
快速回复
限100 字节
 
上一个 下一个