C++ or C# to get started?

TexBlog reader Gordon writes:
"I just got VS 2005 C++ Express. I have been looking for comprehensive examples of C++ code and it seems to me there are a great many more C# examples. This is making me wonder if C# isn't a better choice for someone getting started."

Thanks for downloading the Express Editions!

Setting the issue of examples aside for a moment, which language you want to get started with depends mostly on what kinds of software you wish to write.  If you want to write native code Windows apps, platform-neutral native code, learn the Win32 API, or learn how to interop between native and managed code, then C++ is your best choice.  If you want to write managed code applications or want to take the most productive path to writing Windows programs and learning .NET, then C# is probably a better choice.  These recommendations assume, of course, that you don't have a particular language affinity; if you are already familiar with and enjoy one language or the other, or if you really want to learn one language or the other, then that should factor into your decision as well.

Now, about samples...  The samples "in the box" are but a small, small portion of the total samples available to you.  For example, you'll find a lot of C++-based native Windows examples in the Platform SDK.  We also have some VC++ 2003 samples available for download (although these may require a little tweaking to get working with VC++ 2005).  For C#, you'll find a number of examples (although I think they're for .NET 1.1 and could possibly need a bit of tweaking) on MSDN and sites like GotDotNet.  You'll also find a ton of example by simply surfing the web and doing keyword searches for whatever kind of examples you'd like to see.

So, in a nutshell, what I'm trying to say is that there are plenty of examples out there for all languages, so don't let "in the box" examples be your primary determining factor for what language you choose.