Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 03:54, 11 September 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

IMap与std::map类型转换

From Wiki
Jump to: navigation, search
SignpostIcon XAML 40.png
WP Metro Icon WP8.png
SignpostIcon Code 52.png
Article Metadata
Compatibility
Platform(s):
Windows Phone 8
Article
Created: Vincent-DEVDIV (30 Jan 2013)
Last edited: hamishwillee (11 Sep 2013)
std::map<int, String^> map1;
map1.insert(std::pair<int, String^>(1, "DevDiver"));
map1.insert(std::pair<int, String^>(2, "DEVDIV"));
IMap<int, String^>^ map2 = ref new Map<int, String^>(map1);
 
std::map<int,String^> map3;
IIterator<IKeyValuePair<int,String^>^>^ iter = map2->First();
do{
map3.insert(std::pair<int,String^>(iter->Current->Key,iter->Current->Value));
}while (iter->MoveNext());
This page was last modified on 11 September 2013, at 03:54.
50 page views in the last 30 days.
×