Home » Community » Forums » » The C++ Standard Library Part 2
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 The C Standard Library Part 2
Post Reply 
Besides the near-obligatory appreciation given to SiCrane for a well-done article that saves me effort that I would have never been motivated to perform , I can point out the minor issue of two typos, both in the Shrinking vectors section: The first paragraph ends with "...you can use try the copy and swap trick." And the comments in the code example contain the word "shurnk", which, while being fun to say, most certainly should be "shrunk".

Otherwise, thank you muchly.

 User Rating: 1787   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

An excellent introductory article, thank you SiCrane.

 User Rating: 1743   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Quote:

Another thing you may notice about the standard library is that it uses all lower cases identifiers for classes, member function and basically any identifier that isn't a macro. There are historical reasons for this practice; this is not an example that you should copy in your own code.


What are the historical reasons?

 User Rating: 1015    Report this Post to a Moderator | Link

Quote:
Another thing you may notice about the standard library is that it uses all lower cases identifiers for classes, member function and basically any identifier that isn't a macro. There are historical reasons for this practice; this is not an example that you should copy in your own code.


What are the historical reasons?

 User Rating: 1015    Report this Post to a Moderator | Link

Quote:
Original post by Anonymous Poster
Quote:
Another thing you may notice about the standard library is that it uses all lower cases identifiers for classes, member function and basically any identifier that isn't a macro. There are historical reasons for this practice; this is not an example that you should copy in your own code.

What are the historical reasons?

No idea, but the C std library is also all lower case (except, confusingly, for FILE pointers). Was C at some point not case-sensitive?

 User Rating: 1743   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Definitely a SiCrane-quality article. There's one more typo that Agony didn't mention:
Quote:
Another common use of std::remove_if<>() is to remove an element if one of it's member functions returns true.

It should be "its", of course.

Also, I was rather surprised by the absence of any material covering or mentioning std::vector<>::at. Perhaps I missed it?

Please read the DirectX FAQ, it answers a lot of common technical questions | NeXe | Journal #259850

 User Rating: 1823   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Obligatory pimp of my article about std::vector : http://gpwiki.org/index.php/C_plus_plus:Modern_C_plus_plus:Vectors

Quote:
Original post by Anonymous Poster
Quote:
Another thing you may notice about the standard library is that it uses all lower cases identifiers for classes, member function and basically any identifier that isn't a macro. There are historical reasons for this practice; this is not an example that you should copy in your own code.

What are the historical reasons?

Maybe Bjarne didn't like upper-case letters, who knows ;)

I find uppercase_with_underscores nice anyways, so meh.

 User Rating: 1082   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Fantastic article that I found extremely useful.

Having just grasped the basics of MFC Lists, I've been looking for a good article to indroduce (and give examples of) the STL equivalants.

I didn't notice std::vector<>::at either. I guess that's one to look-up elsewhere!

Thank you very much SiCrane.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Ah, short, simple, and short, just the way I like em :)

Thank you SiCrane.

 User Rating: 1028   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

This article is excellent!

Expecially mentioning boost here makes it even more brilliant.
Imho boost is has become a "must" use for c++ devolepers. However I often wonder that many c++ developers don't even know it.

Keep up good work SiCrane!
Cheers,
Jochen

 User Rating: 1050   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Excellent article, thanks SiCrane.

 User Rating: 1051   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: