Cannot understand the references and documentations

I've been using Java for the past 3 years but I'm a total beginner with C++.

I just can't seem to understand the way most C++ library/documents are written.

Take, for example : http://www.cppreference.com/cppmap/map_constructors.html

The contstructors for maps are written as :
1
2
3
4
5
6
7
  #include <map>
  map();
  map( const map& m );
  map( iterator start, iterator end );
  map( iterator start, iterator end, const key_compare& cmp );
  map( const key_compare& cmp );
  ~map();


I....don't even understand that. I tried declaring a map and it seems that map is a template that requires two parameters. So I can't just map newmap. I have to declare it like this map <string, int> newmap.

I understand what that does and why I'm doing it. But where is this mentioned in the documentation I linked? How am I supposed to know, short of looking up examples?

Also, does this site ( http://www.cppreference.com/ ) contain all of the default classes?

Thank you for any help. I'm kind of stuck here.
Well, you were looking at the constructor reference, which shouldn't really contain that information except in optional examples (look at this equivalent: http://www.cplusplus.com/reference/stl/map/map.html). Declaration is different from construction. Look, in contrast at this other page: http://www.cplusplus.com/reference/stl/map/
cppreference isn't all that great. It's an OK reference and good if you only need a quick peek at the prototypes.
http://www.sgi.com/tech/stl/table_of_contents.html

I find that to be the best STL documentation available.
Alright, I'm reading through that article. Starting to get a hang of it.

But now I've got one question. I can understand the STL somewhat, but what about the non-STL stuff? I've downladed Codeblocks, boost, also have MS Studio 2005 installed. There are tons of non-STL stuff that came with them. Where do I find the documentation for them? I am....at a lost.
Well, the C++ Standard Library in itself is not purely STL. You've also got the C library, streams, strings, algorithms.
Code::Blocks is an IDE, so I have no idea what you're talking about.
Many proprietary compilers like to choose which parts of the standard to implement, along with what non-standard stuff to add. It's best not to use anything non-standard in this case.
And, unsurprisingly, the best place to find boost documentation is the boost website.
Topic archived. No new replies allowed.