# Monday, 18 November 2013
Are you joining us tomorrow for a one-day introduction to C++ at Microsoft Virtual Academy? (No? There's still time to register.) Then you might want the sample code we'll be using. We're probably going to go too fast for you to actually follow along in your copy of Visual Studio, but you can try. I've attached a zip of the code to this post.


Demos.zip (164.55 KB)
Monday, 18 November 2013 14:22:01 (Eastern Standard Time, UTC-05:00)  #    Comments [4]
Wednesday, 20 November 2013 10:02:09 (Eastern Standard Time, UTC-05:00)
Hi Kate,

Thank you for a very informative and enjoyable training yesterday on C++. The sessions were concise and you guys were great. We appreciate all of your hard work to prepare the excellent presentation. C++ in a day - who says it can't be done.

Kurt Slentz
Kurt Slentz
Saturday, 14 December 2013 09:07:01 (Eastern Standard Time, UTC-05:00)
I'm trying to run through these videos with VS2010. The type casting code simply won't compile. Not when I type it in by hand, and not when I downloaded and opened the demo. The syntax that is used:
int i{ 2 }; causes an error. In fact, when I use the demo code for that example, not even the #include works.

Maybe because you used VS2013 it does something behind the scenes in order to use this syntax (you weren't using MANAGED CODE for this video series were you??), but when I create an empty win32 console project, I can get normal C++ to work just fine.

In point of fact not a single one of your code examples works out of the box. I need to create my own project, then copy your code into my project, change all of the assignment statements to the correct syntax (meaning int i = 2;) before any of it will work. This means I can't tell if the things I'm trying to relearn aren't working because I'm doing it wrong, of because there's something in the code that's been slipped in there that only works on an MS compiler.

Saturday, 14 December 2013 09:57:17 (Eastern Standard Time, UTC-05:00)
The code won't work with VS2010. Not because it's managed, or any kind of extension, but because the brace syntax -- int i {2); -- is a C++ 11 feature that was not implemented in VS2010. It will work fine in VS2013 whether Express or one of the paid SKUs. If you have access to the latest version of clang or gcc it will work in those compilers too, but it probably won't work in a three-year old version of any compiler.

Thanks for watching the show and your interest in the code. I assure you it all works "out of the box" as long as the compiler supports the modern C++ features (that have been in the standard for 2 years now) used in the samples.
Saturday, 21 December 2013 16:04:04 (Eastern Standard Time, UTC-05:00)
Thanks for your response. True I'm using a 2 year old compiler, but not everyone gets to update their compilers -- or even their coding libraries -- as frequently as they'd like. Or, as it is at my company -- at all, which is why I'm off on my own trying to relearn old skills. I've been out of the C++ coding game for far too long, and thought that the jump start videos would be useful to get me caught up, and for the most part, they have been.

Once I started using VS2013exp, everything compiled out of the box. But as I said, not everyone is using the latest and greatest, and for some companies, something that's a two year old standard is still quite new. It all depends on the product you're producing and the corporate culture you're forced to work within. The one I'm trying to leave is... well... stagnant would be a polite word for it.

Anyway, thanks for the info.
Comments are closed.