.NET Zone is brought to you in partnership with:

I’ve been a Windows developer since 3.0 and caught the Visual Basic wave early with v1. I’ve released a “production” application in every version of VB since then (except VB for DOS). Focusing on enterprise, line-of-business development I’ve built Call Center Applications, Mortgage finance systems, Customer Relationship Management tools and more recently I’ve been in the Litigation Support/Electronic Data Discovery/Electronically Stored Information space. Greg is a DZone MVB and is not an employee of DZone and has posted 475 posts at DZone. You can read more from them at their website. View Full User Profile

From C# to C++, the short guide that isn't (all that short)

02.11.2012
| 3068 views |
  • submit to reddit

Bob Taco Industries - C# to C++ – A Somewhat Short Guide

"This is a big post – over 12200 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.

For those interested, the sessions from the GoingNative 2012 conference will be streaming live today (Feb 2) and tomorrow on Channel 9: http://channel9.msdn.com/posts/Announcing-the-GoingNative-2012-Full-Schedule . Sessions will also be available for download shortly after the show ends (I’d guess within 24-48 hours, but that’s just a guess). It looks fascinating so definitely check it out! (I know I will be watching it.)

Introduction

This is a somewhat short guide to the important things to know if you are a C# programmer and find yourself needing or wanting to work in C++, for example to create Metro style games for Windows 8 using C++ and DirectX. In fact, this guide is written with that goal in mind so it's not necessarily a universal guide for all platforms and purposes.

This guide is also going to be fairly utilitarian and pithy, with code standing in place of elaborate commentary. I'm expecting that you know how to program already and have a good understanding of C# (or of some sort of imperative, object-oriented language at any rate).

I'm also assuming you are fairly handy with navigating the MSDN library. Its Bing search box is really awesome; if you haven't used it before, do give it a try. I like how the search is tailored to not just MSDN but also other great programmer sites like the Stack Exchange sites, CodeProject, CodePlex, etc.

I'm sprinkling a fair bit of code throughout as I said above. This is both to show you a (pseudo) real example of something and also to help illustrate words with code so that each will hopefully help to clarify the other.

..."

When he said "Somewhat short" he wasn't kidding. The PDF is 38 pages.

image

References
Published at DZone with permission of Greg Duncan, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)