| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 897 人关注过本帖
标题:请问什么是“value type”
只看楼主 加入收藏
chenkuanyi
Rank: 1
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-4-21
收藏
 问题点数:0 回复次数:2 
请问什么是“value type”
请问什么是“value type”
搜索更多相关主题的帖子: value type 
2008-10-29 14:04
冰烨
Rank: 1
来 自:不咔界
等 级:新手上路
威 望:1
帖 子:135
专家分:0
注 册:2007-10-30
收藏
得分:0 
In object-oriented programming, a value type is a data type that can exist outside dynamic memory allocation. Unlike reference types, value types can be directly embedded into composite objects.

Primitive types are always value types.

Value types can exist in dynamically allocated memory, such as embedded into a dynamic object. Some platforms also allow direct dynamic allocation of value objects, while others require the value to be copied into a specific dynamic object. The later process is called boxing.

On some platforms, a value may be directly linked to by a pointer or reference. On others, it is a prerogative or reference types.

要么死去,要么奋斗!
2008-10-29 16:43
随心
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:12
帖 子:2577
专家分:250
注 册:2007-8-12
收藏
得分:0 
代表一种类型吧
比如map定义的类型
map<K,V>::key_type
map<K,V>::mapped_type
map<K,V>::value_type

天之道,利而不害。圣人之道,为而不争。信言不美,美言不信。善者不辩,辩者不善。知者不博,博者不知。
2008-10-29 16:49
快速回复:请问什么是“value type”
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019388 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved