C++0X

Hi allo,

I am stuck on understanding the difference between what is the

 
std::initializer_list<std::pair<std::string,int>> 


and

 
std::map<std::string,int>


May you have an explanation?
n squared vs nLog(n)

edit:
do you know what an initializer list is? Like on a constructor implementation
1
2
3
4
Foo::Foo( ) : m_lNumber( 0 ), m_strName( NULL ), m_nID(0 )
{

}


ever seen anything like that?
Last edited on
I DID NOT get it
From Wikipedia:

The class std::initializer_list<> is a first-class C++11 standard library type. However, they can only be initially constructed statically by the C++11 compiler through the use of the {} syntax. The list can be copied once constructed, though this is only a copy-by-reference. An initializer list is constant; its members cannot be changed once the initializer list is created, nor can the data in those members be changed.
Topic archived. No new replies allowed.