由买买提看人间百态

topics

全部话题 - 话题: maptype
(共0页)
c**********e
发帖数: 2007
1
来自主题: JobHunting版 - C++ Q56: map & typedef (C29)
typedef std::map MapType;
MapType theMap;
Referring to the code sample above, which one of the following blocks of
code displays the string contents of the entire map theMap?
a) MapType::iterator it = theMap.first();
while(it!= theMap.end()) std::cout << it;
b) MapType::iterator it = theMap.begin();
while(it!= theMap.end()) std::cout << theMap[it];
c) MapType::iterator it = theMap.begin();
while(it!= theMap.end()) std::cout << (*it++).second;
d) MapType::iterator it = theMap
h**o
发帖数: 548
2
来自主题: Programming版 - std::map
知道可以这样:
typedef map mapType;
mapType data;
data["FontSize"] = 10;
怎样实现这个那?
data["type1"]["FontSize"] = 10;
data["type2"]["FontSize"] = 4;
w******g
发帖数: 67
3
来自主题: Programming版 - C++ question about template typedef
Thanks a lot. Another question: if I want to define a function template to
print out the elements of the MapOfVec.
template
struct MapOfVec
{
typedef vector VecType;
typedef typename vector::iterator VecIter;
typedef map MapType;
typedef typename map::iterator MapIter;
};
template
void printElems_MapOfVec(const MapOfVec::MapType& map);
It a
B********e
发帖数: 1062
4
来自主题: Programming版 - C++ question about template typedef
This may work.
template
class MapOfVec{
public:
typedef vector VecType;
typedef typename vector::iterator VecIter;
typedef map MapType;
typedef typename map::iterator MapIter;
void print(MapType& map);
};

agian.
A******r
发帖数: 974
5
ATT coverage looks fine, see
http://www.att.com/maps/wireless-coverage.html?maptype=voice&se
I'm not in RTP
p****x
发帖数: 707
c*****n
发帖数: 14445
7
http://www.weather.com/maps/maptype/currentweatherusnational/us
今天全美温度地图显示
华盛顿州东部那里和凤凰城,德州和佛罗里达一样并列最热!!!
c*****n
发帖数: 14445
8
http://www.weather.com/maps/maptype/currentweatherusnational/us
以52度的低温秒杀三番和大峡谷,而仅仅比明尼苏达和北密热那么一点点
P*******e
发帖数: 39399
g*********6
发帖数: 1149
k**f
发帖数: 372
11
来自主题: Programming版 - std::map

map
B********e
发帖数: 1062
12
来自主题: Programming版 - C++ question about template typedef
template
struct MapofVec{
typedef vector VecType;
typedef typename vector::iterator VecIter;
typedef map MapType;
typedef typename map::iterator MapIter;
};

use
**
(共0页)