-
April 7th, 2004, 06:25 PM
#16
Honestly, I have not seen any documentation or tutorial
available online (available free) that is as useful as the
documentation of the C language and of the rest of the C++
language.
Normally I agree with what Sam posts, but in this case I
disagree that most programmers can effectively learn
"the rest of the C++ language" from on-line (available free)
documentation. Certainly not from MSDN (in my opinion).
MSDN gives the syntax, but has very little info on C++ design.
(I admit, that the flaw might be with me, and not MSDN - I'm
certainly not a programming expert and using MSDN to learn
C++ might just be beyond my capabilities. Maybe real computer
programmers can.)
Look at the following code posted by a "stl-basher" in the
Visual C++ forum. He claimed that it was a great design.
However, the design is flawed - and flawed in a very basic way.
But I doubt that looking at MSDN will show why. (I spent about
30 minutes searching MSDN and could not find anything ...
maybe its there and I missed it.) And public inheritance is
basic to the C++ language.
Code:
class CUpperCaseString : public CString
{
public:
CUpperCaseString(LPCSTR szString)
: CString(szString)
{
MakeUpper();
}
virtual ~CUpperCaseString()
{
}
};
What is the difference between public and private inheritance,
and when/why would you ever use private inheritance? I
searched for that in MSDN and came up empty. Again, maybe its
there somewhere.
Pretty much look at any of the points in Meyers Effective C++
books. I have not found on-line documentation that covers the
majority of them in proper detail.
Personally, I don't even think the documenation for the MFC
classes is any good. I have never found any complexity
guarentees on performance for the various functions. About all I
can find is that "inserting into a CArray is slow" and
"inserting into a CMap is fast". I agree with both those
statements in GENERAL, but I can also show examples where
the statements are not true. And while performance is not an
issue in all programs, it is certainly an issue and many codes.
Some on-line sites that I find useful (both STL and C++ in general)
http://www.josuttis.com/libbook/idx.html
http://www.gotw.ca/gotw/
http://www.aristeia.com/publications_frames.html
and not leave out MSDN ...
http://msdn.microsoft.com/library/de...tml/SAMPLE.asp
http://msdn.microsoft.com/msdnmag/is...L/default.aspx
-
April 7th, 2004, 10:10 PM
#17
I think I pretty much agree with you, Philip. Please understand that you are coming from the opposite direction. I did not say that the MFC documentation and the rest of the MSDN is wonderful. I was just saying that they are better compared to ths STL documentation.
What is critical here is the definition of "effectively learn". What I am saying is that it is generally possible to learn enough to write a program using C and C++. That might not be true, but if not then that would support the important point of what I am trying to say; that is, that the STL documentation is not sufficient for using the STL. Good software design is a different matter, and the STL documentation is worse in that manner, not better.
-
April 8th, 2004, 12:32 AM
#18
Originally posted by Sam Hobbs
the important point of what I am trying to say; that is, that the STL documentation is not sufficient for using the STL.
Fair enough, you must have an introduction other than just reading the SGI docs. This is done in varying degrees on some sites and in articles available online (e.g. std::vector by Gabriel). My point is that once you understand the concept of STL (iterators, containers, algorithms, templates), you don't need a book anymore. There are advanced techniques that are only in books, but for most of the how do I use this-type questions, the SGI docs are sufficient. But yes, it's not for the uniniatiated. I.e. if you want to learn the concepts of STL, it's a bad idea to start only from the docs. But if you have used vector, string and map, you just need the SGI docs to see what a deque and a multiset do and how to use them.
Last edited by Yves M; April 8th, 2004 at 12:34 AM.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
-
April 8th, 2004, 12:40 AM
#19
Originally posted by Yves M
There are advanced techniques that are only in books, but for most of the how do I use this-type questions, the SGI docs are sufficient.
I have been quite frustrated trying to use the documentation for determining some very basic uses of STL.
-
April 8th, 2004, 12:44 AM
#20
Maybe. I've always found what I was looking for, except for the stuff about allocators and advanced techniques, like how to best combine several things into others.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|