Posts
67
Comments
120
Trackbacks
0
Tuesday, February 14, 2012
C# to C++–A Somewhat Short Guide (Update 1)

Last updated: 2012-02-14

This is a big post – over 12200 16600 words – and so I’ve decided to make it available as a PDF download, which you can get here:

http://www.bobtacoindustries.com/Content/Devs/CsToCpp-ASomewhatShortGuide.pdf

It has bookmarks for easier navigation along with a Table of Contents and page numbers.

I expect that I will revise this from time to time and welcome any suggestions, feedback, and (especially) corrections. If so I will update the Last updated field at the top and will create a revised PDF as well. I hope this proves useful.

Update: I realized when looking at stats the other day that this post was so big that it wasn’t going through to many people’s RSS feeds (including my own!). So I stripped out the text and have decided just to keep it as a PDF link.

Updates and Changes:

2012-02-14

New sections:

  • Namespaces
  • enums subheading under Fundamental types
  • Functions
  • A brief word on the volatile keyword
  • Casting values
  • nullptr subheading under Pointers
  • Lambda expressions

Significant changes:

  • Added discussion of cstdint header to Fundamental types
  • Touched up some language and added a brief note on “mixins” to Multiple inheritance
  • Added subheadings to C++ constructors; also revised its code sample
  • Added a note about non-string uses of the ‘char’ type to Strings

There were many other miscellaneous edits made. I incorporated much of the great feedback I’ve received in the comments. I did not end up moving the Pointers section this time but have not ruled it out either. I’m on the fence about it because, to me, modern C++ is all about clean, safe code with automatic storage duration objects and C++ Standard Library container types. Pointers are still a part of C++ and likely always will be. But I’m not convinced that they belong right up front. I need to re-read the document through from beginning to end before I make a decision on that, I guess.

Most of the things I wanted to add this time around are in the document now. I’m considering a section on multi-threading but that will have to wait for another update. Once VS11’s ranged for loop support is released, I’ll be adding a section on that. I would like to make the templates discussion a lot more in depth at some point but that’s something for another time.

The link above has not changed; the new version is there now and has subsumed the old one. I’ll be posting this as a new blog post as well so if you see it twice, that’s why.

Posted On Tuesday, February 14, 2012 1:52 PM | Comments (0)
Bob Taco Industries is an ISV focused on game and app development for Microsoft platforms headed up by Michael B. McLaughlin. Mike is a Microsoft Visual C++ MVP (previously an XNA/DirectX MVP from 2011-2013), a developer, a writer, a consultant, and a retired lawyer. If you're a developer who is just getting started, consider checking out the BTI website's section for developers for links to code samples and other helpful sites.
Tag Cloud