954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

what does this line say?

typedef  map<string, Attr_info, less<string> > AttrMap;


i do not know what "map<", less and ">" represents?

What I little understood from the code is AttrMap is a collection of Attr_infos. If so how can i add a Attr_info into AttrMap?

could u plz help?
thanx

asilter
Junior Poster in Training
60 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

I don't know, maybe it's c++, like there are every kind of weird << and >> in cout... But at least it's not c. Following the typedef identifier should be a declaration, which mostly starts with a type, not with map> something... With typedef you define type, you can use this to declare another type, or array of another type, or use it in whatever way how you can use simple types like char and int.

TkTkorrovi
Junior Poster
170 posts since Mar 2005
Reputation Points: 85
Solved Threads: 13
 
typedef map<string,Attr_info,less<string> > AttrMap;


i do not know what "map<", less and ">" represents?

What I little understood from the code is AttrMap is a collection of Attr_infos. If so how can i add a Attr_info into AttrMap?

could u plz help?
thanx

asilter
Junior Poster in Training
60 posts since Oct 2006
Reputation Points: 10
Solved Threads: 0
 
Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You