C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
Why am I getting these _SCL_SECURE_NO_WARNINGS messages?
Recently, a C++ developer asked why they were getting diagnostic messages for this code: [code lang="cpp"] void example(char const * const src, char * const dest) { std::copy(src, src + 42, dest); } If you compile this file in debug mode, you'll get a message like the following:xutility(2350,1): warning C4996: 'std::copy::_Unchecked_iterators::_Deprecate': Call to 'std::copy' with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' _D...
Vcpkg: introducing export command
Vcpkg helps you acquire and build open source libraries on Windows. Since September 2016, the community added more than 200 libraries in the vcpkg catalog and has been contributing actively to the code itself. Vcpkg now supports Visual Studio 2015 and Visual Studio 2017 and can target dynamic or static libraries and platforms like x64, x86 or UWP. Today we are delighted to announce a new command: vcpkg export. As you told us in our recent survey, there is a need for a command that exports the binaries that you built using vcpkg. The purpose of this new command is to let you share and redistribute the binaries ge...
Visual Studio Code C/C++ extension April 2017 Update
Earlier today we shipped the April 2017 update to the C/C++ extension for Visual Studio Code. We are excited to introduce the following new features in this update: The original blog post has been updated with these changes. If you have this extension installed already, Visual Studio Code sends a notification for the update and installs the update for you automatically. If you haven’t installed it before, download the C/C++ extension for Visual Studio Code to try it out. Error Squiggles and Quick Info Enabling the features In this update, we’re shipping Error Squiggles and Quick Info as “experimen...
Getting Started with Visual Studio for C and C++ Development
Are you new to Visual Studio and working with C++? Then you’ve come to the right place. Whether you’re a student writing one of your first programs or a seasoned C++ developer with years of experience, you'll find Visual Studio to be a powerful environment for C++ development. Visual Studio is an IDE packed with features, from code browsing, colorization and navigation, to autocompletion of symbols, a built-in compiler and build system, a top of the line debugger, and built-in testing and code analysis tools. We have you covered from beginning to end, from code inception to continuous integration management, but ...
C++ Code Editing and Navigation in Visual Studio
Visual Studio comes packed with a set of productivity tools to make it easy for C++ developers to read, edit, and navigate through their code. In this blog post we will dive into these features and go over what they do. This post is part of a series aimed at new users to Visual Studio. This blog post goes over the following concepts: Reading and Understanding Code If you’re like most developers, chances are you spend more time looking at code than modifying it. With that in mind, Visual Studio pr...
C++ Unit Testing in Visual Studio
Testing is an increasingly important part of a software development workflow. In many cases, it is insufficient to test a program simply by running it and trying it out – as the scope of the project gets more involved, it becomes increasingly necessary to be able to test individual components of the code on a structured basis. If you’re a C++ developer and are interested in unit testing, you’ll want to be aware of Visual Studio’s unit testing tools. This post goes through just that, and is part of a series aimed at new users to Visual Studio. This blog post goes over the following concepts: ...
Android and iOS development with C++ in Visual Studio
When it comes to building mobile applications, many developers write most or a part of the apps in C++. Why? Those who are building computationally intensive apps such as games and physics simulations choose C++ for its unparalleled performance, and the others choose C++ for its cross-platform nature and the ability to leverage existing C/C++ libraries in their mobile applications. Whether you’re targeting Universal Windows Platform (UWP), Android, or iOS, Visual Studio enables building cross-platform C++ mobile applications with full editing and debugging capabilities all in one single IDE. In this blog post,...
CMake support in Visual Studio – what’s new in 2017 15.2 update
Today’s preview release of Visual Studio 2017 15.2 update comes with several improvements and new features in CMake Tools for Visual Studio – recently updated to cover 15.2. We have upgraded the included version of CMake to 3.7.2 and enhanced the discoverability of features in the CMake menu. This update also includes bugfixes for community reported issues. Please download the preview and try out the latest CMake features. If you are just getting started with CMake, follow the link to learn more about CMake support in Visual Studio. We are looking forward to your feedback. CMake Tools Upgraded to CMake 3.7.2...
Universal Windows Platform Development with C++
Universal Windows Platform (UWP) applications utilize a new Windows API and app model that creates a single output binary that can feasibly run on any Windows 10 device, ranging from desktops to HoloLens. Because a app can run on a wide variety of devices with different form factors and types of input, you want it to be tailored to each device and be able to unlock the unique capabilities of each device. In addition to the guaranteed core API layer, you can write code to access device specific APIs so that your app lights up features specific to one type of device while presenting a different experience on othe...