20 Modern Visual C++ Best Practices

Play 20 Modern Visual C++ Best Practices

The Discussion

  • User profile image
    ericsk

    May I know would it cover the C++11 new features?

  • User profile image
    EricBattalio

    Hi ericsk, it covers what is currently shipping, so if the feature is available in Visual C++ (or an update) now, it might be covered.

    You can influence what is in the talk! Go to https://aka.ms/techedcpptips and add your favorite tip (or suggestion!).

    Thanks!

  • User profile image
    magnithor

    Are you going to talk about c++ amp?

  • User profile image
    EricBattalio

    Hi magnithor, I can work with the community to ensure there is at least one best practice for AMP included in the session (or the appendix)! I hope to bring a few C++ AMP books (by Kate Gregory and Ade Miller) to give away Smiley

    -eric

  • User profile image
    Deactivated User

    Minute 19 Missing reference- For tips from him refer his blog
    http://www.drdobbs.com/author/Andrew-Koenig
    There was question on memory leaks, so I had to recommend https://msevents.microsoft.com/CUI/VideoDisplay.aspx?EventId=1032518299&culture=en-US

  • User profile image
    EricBattalio

    Thanks VSChawathe!

  • User profile image
    Chris

    Eric,

    Thanks for the video; however I must disagree a bit with "no naked pointers" @ the 7:30 mark in the video.

    Your suggestion on using a smart pointer to avoid the naked pointer is sound in certain situations but I would offer a less "expensive" alternative to only using smart pointers and thats adding std::nothrow to the new allocation (example: char *x = new(std::nothrow) char[256];). It will return a 0 (removing the need for exception handling) and then you can handle that lack of memory alloc. and or clean up the pointer at a later time. You can always fashion your code to not use exception in a safe way.

    The reason why I am bringing this is is that; for embedded system programming, resources are very scarce and adding smart pointers everywhere with exception handling will bloat the application significantly for those target systems.

  • User profile image
    Please let it die already

    Why is online office apps utter crap? Virtual and illogical limitations:

    Click on Slides -> view online.
    Message: "File too large
    The file specified is larger than what the Office Online Viewers are configured to support.
    Reduce the size of the file to view it online."

    Nice job microsoft. Everything you do is failure. You must be aiming for it because to fail this often at "random" *cough* incompetence is a statistical improbable for a business.

    Thank open source community for delivering what microsoft fails at which is more and more these days.
    The open source community even listens to feedback.
    They would never have removed the start menu or forced desktop users to use metro.
    They would never try to lock you in to some crappy ui with even crappier programming language.

    God damn it! WTF is wrong with you microsoft?!
    Can't help it. This constant stream of frustration needs to go somewhere since microsoft is not listening.

  • User profile image
    JamesMc​Nellis

    @Chris: Even if you are not using exceptions, you can still use RAII, and the generated code is practically always as efficient as the correct cleanup code that you would have to write by hand.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.