Prev: Testing Framework for MFC
Next: Crash in CFileDailog when called from hook procedure (OFNHookProc)
From: RB on 11 May 2010 11:44 Joe I filed notes on your input. If I wanted to buy one book on STL that was on a beginners level but still offered excellent material. Do you know of such a Title ?
From: RB on 11 May 2010 11:53 >> CMap<CStrng, CString&, CPoint, CPoint&> MyMap2; //error C2065: 'CStrng' : undeclared identifier > Did you see the error message CStrng' : undeclared identifier > You have to type CString :) Thanks I am slowly beginning to beginning to decphier logic of STL. I did some more searching and found that for the above to work I would have had to override the HashKey with a CString type.
From: RB on 11 May 2010 12:01 > If you use std::map, you have to specify only two template arguments instead > of four: just the key type and the value type: > > #include <map> // Use STL map container > > std::map< CString, CPoint > MyMap; > MyMap[ _T("Vertex1") ] = CPoint(0, 0); Thanks Giovanni Yes, I also remember you suggesting std::vector over CArray which I did want to do buy the VC 6 help docs don't have much on std::stuff. Maybe VS2005 will. My biggest problem in this area is my incompetence in STL. Recomend any one good book on it ?
From: Giovanni Dicanio on 11 May 2010 17:47 "RB" <NoMail(a)NoSpam> wrote: > Yes, I also remember you suggesting std::vector over CArray which I did > want > to do buy the VC 6 help docs don't have much on std::stuff. Maybe VS2005 > will. My biggest problem in this area is my incompetence in STL. I was incompetent in STL some time ago, and I believe that everyone was once :) I mean: everyone of us just learnt new things on the road. As a starting point, I would suggest you to find some examples on the web and tutorials and do some practice. Just explore some methods of STL classes with simple console apps, to grasp the general design and ideas in STL. > Recomend any one good book on it ? I think that this one is good: http://www.amazon.com/Standard-Library-Tutorial-Reference/dp/0201379260 There will be some lessons on STL on Channel9 (http://channel9.msdn.com/) soon. Giovanni
From: Joseph M. Newcomer on 11 May 2010 19:24
I had one years ago, but I seem to have lost it (if it is somewhere in my unfiled books, there are about 200 of them scattered in piles all over the office) I searched for it a few month ago because someone had asked a similar question, and couldn't find it. But I remember it as being a useful book back when I was trying to use STL. Part of the problem was that at the time I was using VS6 and VS.NET with its numerous language fixes were not out yet. joe On Tue, 11 May 2010 11:44:25 -0400, "RB" <NoMail(a)NoSpam> wrote: > > >Joe I filed notes on your input. >If I wanted to buy one book on STL that was on a beginners >level but still offered excellent material. Do you know of such >a Title ? > Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm |