Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am C++/VC++(MFC)developer. I am new (not very new) with STL. Whenever I come across any function in STL I find difficult to read its prototype because of template notations.
Though, I know template very well, all the types of templates, but not able to understand template notations.

Any help in this regard will be highly appreciated.

Happy Programming.
Posted

STL and template notations are basically quite simple and standard; they always use the same style.

have a look at this article :
An Introductory STL tutorial[^]

Max.
 
Share this answer
 
It's also worth going through this section[^] on MSDN. I think the biggest mistake with templates was allowing the use of the class keyword to define a type (rather than typename) as in:
C++
Template < class T  >
class MyClass
{
    T myVar;
...

where < class T > actually means that T is a placeholder which will be replaced by a real type when a real class is built from the template such as:
C++
MyClass<int> mc;

where all occurrences of T will be replaced by int<code>.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900