From the blog

5 New Posts With Free C++ Builder CE, Dev-C++, BCC, GCC Examples

Hello developers, if you just starting out on your C++ journey and want to jump to a modern IDE and C++ compiler, there is a free version of C++ Builder, C++ Builder 11 CE Community Edition released on April 2023. If you are a start-up developer, student, hobbyist, or just interested in learning to code then the C++ Builder Community Edition may well be just the thing for you. Read the FAQ notes on the CE license and then simply fill out the form to download C++ Builder 11 CE. Today we have 5 more C++ posts, some of C++ examples in these posts can be used with C++ Builder or the C++ Builder 11 CE Community Edition, and others can be used with Dev-C++, BCC C++ Compilers, and some other compilers such as the GCC compiler. Table of Contents Where can I learn to program with free C++ examples? What is new in C++ Builder CE? What are the important features of C++ that can be used with C++ Builder CE? Learn C++ Builder CE with C++ examples Get in touch and tell us what you’d like to see on the blogs What might be next for C++ Builder? Where can I learn to program with free C++ examples? If you don’t know anything about C++ or the C++ Builder IDE, don’t worry, we have a lot of great examples on LearnCPlusPlus.org website and they’re all completely free. Just visit this site and copy and paste any examples there into a new Console, VCL, or FMX project, depending on the post example. We keep adding more C and C++ posts with sample code. In today’s round-up of recent posts on LearnCPlusPlus.org, we have new C and C++ posts with very simple examples that can be used with: The free version of C++ Builder 11 CE Community Edition or a professional C++ Builder  or free BCC32C C++ Compiler and BCC32X C++ Compiler or the free Dev-C++ What is new in C++ Builder CE? C++ Builder 11 CE which is the free Edition of C++ Builder has been recently released. Embarcadero has made available a Community Edition license for the most recent 11.3 release of Delphi and C++Builder. This is a free edition of either Delphi or C++Builder for students, hobbyists, and startups (as the license is revenue-limited). What are the important features of C++ that can be used with C++ Builder CE? C++ is one of the most powerful programming languages that we use for all sorts of purposes, from regular applications, games, business, industrial infrastructure, robotics, and in the control of IoT devices. The most well-known controllers for those areas where human and computer interaction are important and stretches beyond simple keyboard input are joysticks or gamepads. One of the simplest examples to use them on Windows is using the venerable XInput library which has been around for quite a long time but can still be easily used with the latest C++ Compiler. In the first post, we explain how you can use a gamepad or joystick controller in C++ with the Xinput library. https://learncplusplus.org/how-to-use-a-game-pad-or-joystick-controller-in-c-on-windows/ C++ Builder is the easiest and fastest C++ IDE for building professional applications with powerful GUI components like Memo, Edit, ListBox, StringGrid and many more. Each component can be skinned with Styles to change their visual appearance. Styles are very powerful and because of this it can […]

Read More

CIOs are investing more in digital workflows — and reaping the rewards

The way businesses support employees has changed dramatically in the last few years — and chief information officers (CIOs) are tasked with keeping up. With employees sent home to work remotely in 2020, businesses had no choice but to shift from paper to digital workflows to get work done. But there’s still more work to do if businesses want to realize the benefits that come with digital processes. By investing in greater digitization, CIOs can help their organizations make the most of data analytics and insights, unlock new business and revenue opportunities, and significantly reduce costs. Nearly half (49 percent) of CIOs surveyed said time and operational constraints had led to incomplete or unsatisfactory restructurings, with two-thirds saying they plan to develop their digital document processes further. Here’s why CIOs are so intent on continuing their investment in digital workflows. Increased productivity Currently, less than half of CIOs say their digital workflows aka document processes are either advanced or leading. This stage is defined as document digitization that is available to everyone and artificial intelligence (AI) that supports orchestration and decision-making based on data. The impact of not having advanced digital workflows is often less efficiency and productivity within the organization. About half of the CIOs surveyed (51 percent) admitted that legacy workflows were impeding productivity in their organizations. In the report, 451 Research’s Conner Forrest noted, “As we continue to invest in modern technology, especially through things like automation and artificial intelligence — whether it’s in document workflows or elsewhere — we are making an investment in freeing employees up to work more strategically, to think more creatively.” This is an important point. As CIOs, our role isn’t just to decide what technology is best, but to implement technology that frees up employees to work as productively and strategically as possible. Improved employee and customer experiences When workflows and internal processes are fully digitized, the CIOs surveyed by Forbes say the two most likely outcomes are more efficient employees (65 percent) and higher morale (63 percent). In the report, Forrest is quoted as saying, “The more we invest in the tools and technologies we use to get our work done, the better engaged our employees are.” Likewise, Microsoft chief digital officer Andrew Wilson also noted in the report that digitization can have a significant impact on the customer experience. “If employees aren’t spending time scanning and uploading documents or chasing down contracts, they have time for higher-value work — and that work can often directly impact the customer.” Better business outcomes Perhaps the most critical reason to invest in digital workflows is the overall impact on business outcomes. Organizations understand there are many benefits related to optimized workflows that may not seem all that obvious. Nearly four in ten (39 percent) CIOs said the top benefit they expected to see from improving workflow is a better ability to leverage data analytics and insights. The second most-cited benefit (38 percent) was new business or revenue opportunities. Improving workflows is a strategic investment. Immediate ROI and cost savings can depend on a range of factors including executive and manager buy-in, implementation, ongoing service and iteration, and employee usage. While you may not see immediate cost savings at the flip of a switch, better digital processes can set your business up for […]

Read More

What Is The Rule of Zero in C++?

Object Oriented Programming (OOP) is a way to integrate with objects which can contain data in the form (attributes or properties of objects), and code blocks in the form of procedures (methods, functions of objects). These attributes and methods are variables and functions that belong to the class – part of the class’s code and they are generally referred to as class members. Classes and structs are very useful in modern programming. There are some rules to support the principles of programming, one of which is the Rule of Zero in C++. In this post, we explain what is Rule of Zero in C++ with examples. What is resource acquisition in C++? The principle of Resource Acquisition Is Initialization (RAII) term used in several OOP programming languages, which relates to the ability to manage resources, such as memory, through the copy and move constructors, destruction, and assignment operators. RAII is about the declaration and use of destructors, copy-move operators, and memory management in these members and methods. These cause new rules in development. What is the Single Responsibility Principle in C++? The Single Responsibility Principle (SRP) is a computer programming principle that states “A module should be responsible to one, and only one, actor.” This principle exposes a rule for the classes in C++, called Rule of Zero. Now, let’s see what the Rule of Zero in C++ is. What is the Rule of Zero in C++? Rule of Zero means that, if all members have default member functions, no further work is needed. This is the simplest and cleanest semantics of programming. The compiler provides default implementations for all of the default member functions if there are no special member functions that are user-defined. In other words, you should prefer the case where no special member functions need to be defined. In this rule, classes that have custom destructors, copy/move constructors, or copy/move assignment operators should deal exclusively with ownership; other classes should not have custom destructors, copy/move constructors or copy/move assignment operators. Rule of Zero helps simplify our C++ code without risking resource management issues at run time. The term The Rule of Zero was coined by R. Martinho Fernandes in his paper in 2012. This paper is highly recommended reading to get the full details of this concept. The Rule of Zero rule can be seen in the C++ Core Guidelines here C.20: If you can avoid defining default operations, do. As in the example below, std::map and std::string have all the special functions, so you don’t need to create a constructor and destructor for them.   class Tmy_map {     public:       // … no default operations       private:       std::string title;       std::map<int, int> coords; };   Tmy_map m;       // default construct Tmy_map m2 {m};  // copy construct   How can we apply the Rule of Zero in C++? Here are some notes as to-dos in Rule of Zero. A simple empty C++ class is perfectly equivalent to default implementations (Rule of Five) in a class. A modern compiler is able to provide a default implementation, in example, this simple class. This class is exactly the same as the one below in modern C++.   class Tx { public:    Tx() = default;       Tx(Tx const& other) = default;    Tx& operator=(Tx const& other) = default;       Tx(Tx&& other) = default;    Tx& operator=(Tx&& other) = default;       ~Tx() = default; }   Use a std::unique_ptr if your class can be moved but should not […]

Read More

vcpkg is Now Included with Visual Studio

As of Visual Studio 2022 version 17.6, the vcpkg C/C++ package manager is included as an installable component for the C++ Desktop and C++ Gaming workloads. You can also find it in the installer by searching for vcpkg package manager under the Individual components tab. Using the Visual Studio Copy of vcpkg After you install or update Visual Studio with the vcpkg component checked, the package manager will be installed in your Visual Studio installation directory. You can run vcpkg commands directly from the Developer Command Prompt for Visual Studio or Developer PowerShell for Visual Studio. This also works for the equivalent consoles embedded in the IDE. vcpkg output is localized according to your Visual Studio language. Both ports and artifacts are supported. As with all copies of vcpkg, to initialize it with the IDE, you will first need to run vcpkg integrate install before running other commands. This will enable MSBuild and CMake IDE integration with this copy of vcpkg. You will need to run this command with administrator privileges. Importantly, the copy of vcpkg that ships with the IDE supports manifests but does not support classic mode. The reason for this is that classic mode requires write access to the vcpkg installation directory, but in this case it is in Program Files and the Visual Studio installer requires ownership of it. You can still use classic mode by running integrate install to an external copy of vcpkg instead. Recap: Existing vcpkg IDE Integration vcpkg was already supported by Visual Studio even before this update. Below is a recap of what you can do with the package manager in the IDE. In order to enable this functionality, you must have run vcpkg integrate install once in the past. Once that is done, you do not need to re-run this command. IntelliSense Support Code calling an external library installed with vcpkg will have working IntelliSense, including autocompletion, semantic colorization, code navigation, and refactoring features. MSBuild Integration There are several MSBuild properties for configuring vcpkg for your project. These are available under Configuration Properties > vcpkg. Importantly, you will want to set “Use Vcpkg Manifest” to “Yes” if you intend to use vcpkg in manifest mode with your MSBuild project. Once this is turned on, if you have a vcpkg.json file in your project, vcpkg will automatically be called every time you do a build to check if any dependencies need to be installed or updated. The package manager will then restore missing dependencies, allowing the build to proceed. CMake Integration The IDE automatically picks up the vcpkg.cmake toolchain file and passes it to the CMake command line behind the scenes, allowing you to use the CMake IDE experience seamlessly. Furthermore, if you have a vcpkg.json manifest file in your project, vcpkg will automatically run when CMake configures itself on project load or when the CMake cache is manually generated. The package manager will automatically install or update any missing dependencies, in accordance with the manifest file, allowing you to build your project successfully. Furthermore, CMake find_package() calls also have IntelliSense autocompletion for various libraries available via vcpkg. Environment Activation with vcpkg Artifacts If you have the Desktop development with C++ or Linux and embedded development workload installed in Visual Studio, you can automatically install and activate tools required for your […]

Read More

How To Use Gamepad Or Joystick Controller In A C++ Builder FMX App?

C++ is one of the most powerful programming languages that we can use to create games that are playable with mouse, keyboard and gamepads or joysticks. We also use C++ in commerce, industry, in robotics, and in the control of IoT devices. Despite competition from other programming languages the games market is still very much dominated by C++. Many games seek to go beyond keyboards to control the gameplay by using specialized controllers either in addition to or instead of keypresses on the computer’s keys. Two of the most well-known controllers in these areas are joysticks or gamepads. The simplest examples of interfacing with game controllers on Windows is by using the XInput library. Even though XInput has been around for a long time it can still be used with the latest C++ Editor and compiler for Windows. In this post, we explain how you can use gamepad or joystick controller in C++ using with Xinput library. Is there a component for using a gamepad or joystick in C++ on Windows? If you are looking for a component library, there are Delphi and C++ Builder-compatible components built on the XInput library. The Controller library is a Delphi and C++ Builder component that allows applications to receive input from the Xbox Controller. The main features of this library are: Uses Windows XInput API Available for Delphi and C++ Builder from versions 6 right up to the current modern version 11. Source code included in the registered version. Royalty-free distribution. You can download the trial version of the XInput library, or you can buy a professional edition from here. How can I control a gamepad or joystick in C++ with Xinput Library? XInput library is deprecated but is still a supported library by Microsoft. They recommend moving towards the GameInput library or Windows.Game.Input for Windows applications. If we look at these kinds of libraries (i.e GamePad.h library), like MS’ own DirectXTK, we can see that the toolkit allows one to define USING_XINPUT vs. USING_GAMEINPUT vs. USING_WINDOWS_GAMING_INPUT to pick which underlying library is used. If we compare  XInput compared to GameInput: XInput library is old and easy to implement Windows applications. XInput library is limited to 4 controllers XInput library has no uniform interface to other input (like mouse/keyboard) XInput library occurs with higher latency XInput library is not friendly with other controllers. i.e. no support for Xbox One Rumble Motors. Briefly, DirectInput is better than XInput. If you still want to use XInput, you can check more about https://learn.microsoft.com/en-us/windows/win32/xinput/getting-started-with-xinput XINPUT_GAMEPAD structure (declared in ) is explained here : https://learn.microsoft.com/en-us/windows/win32/api/xinput/ns-xinput-xinput_gamepad As in there, this structure has these members: wButtons, bLeftTrigger, bRightTrigger, sThumbLX, sThumbLY, sThumbRX, sThumbRY. Here wButtons member is used as a bitmask of the device digital buttons, it can be used as below, wButtons Device digital button flags Gamepad Bitmask XINPUT_GAMEPAD_DPAD_UP 0x0001 XINPUT_GAMEPAD_DPAD_DOWN 0x0002 XINPUT_GAMEPAD_DPAD_LEFT 0x0004 XINPUT_GAMEPAD_DPAD_RIGHT 0x0008 XINPUT_GAMEPAD_START 0x0010 XINPUT_GAMEPAD_BACK 0x0020 XINPUT_GAMEPAD_LEFT_THUMB 0x0040 XINPUT_GAMEPAD_RIGHT_THUMB 0x0080 XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100 XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200 XINPUT_GAMEPAD_A 0x1000 XINPUT_GAMEPAD_B 0x2000 XINPUT_GAMEPAD_X 0x4000 XINPUT_GAMEPAD_Y 0x8000 How to use a gamepad or joystick in a C++ Builder FMX application? Here are the steps to use gamepad or joystick in C++ Builder FMX app, Create a new Multi-Device C++ Builder FMX application Drag a Timer (TTimer) component on to Form In Object Inspector window, set its interval to 15 and be sure it is enabled Drag a shape Circle (TCircle) component on to Form In Object […]

Read More

How To Change Background Color Of A Component In An FMX C++ App

C++ Builder is the easiest and fastest C++ IDE for building professional applications with powerful GUI components like Memo, Edit, ListBox, StringGrid and many more. Each component can be ‘skinned’ with Styles to change their visual appearance. Styles are very powerful and because of this it can sometimes take a little to get used to how they work. In this post, we explain how to change background color of a component. Here is how you can do, How can I change background color of a component using styles in an FMX app? Syles are sets of graphical details that define the look and feel of an application visually and they are one of most beautiful and useful UI features of RAD Studio. Styles make your UI elements have a professionally designed appearance with minimum effort from you. Official Styles are designed by Embarcadero’s professional graphic designers. There are also other 3rd party Styles; also, users may generate their own styles. Styles are similar to themes in Windows or skins of old-style applications like WinAmp – but brought right up to date for the modern world. In RAD Studio, Multi-Device C++ Builder FireMonkey Projects, using styles on your new projects is very easy. You design your application’s screens in normal ways with buttons, labels, edit boxes, memos, trackbars, panels, switches etc. These controls will automatically adopt whatever appearance is enabled by the chosen style. You can also add these Styles to your Old C++ Builder Projects or to Old C++ Builder Unit files. You just need a RAD Studio, C++ Builder version which supports styles. We highly recommend you use the latest RAD Studio or C++ Builder versions which have new features and improvements on Styles. Here is how you can use Styles. In addition, you can create your custom styles in RAD Studio and C++ Builder. Here are two examples about Memo (TMemo) and Edit (TEdit) components. How to change background color of an FMX component in C++ code? Here is a simple function example to change background color of a component in C++, 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 void SetBackgroundColor(TStyledControl *control, TAlphaColor color) {   control->NeedStyleLookup();   control->ApplyStyleLookup();   TFmxObject *fmxobj = control->FindStyleResource(“background”);   TRectangle *rect = new TRectangle(fmxobj);   fmxobj->AddObject(rect);   rect->Align = TAlignLayout::Client;   rect->Fill->Color = color;   rect->Stroke->Color = claNull;   rect->HitTest = false;   rect->SendToBack(); } Is there a full C++ example of how to change the background color of a component in FMX and C++? In this example there are Memo, Edit, ComboBox, ListBox components and a Button component. You need to create a new C++ Builder Multi-Device application and then you should drag these components on your form. You can choose your colors from here https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Colors_in_FireMonkey If you want to know more about colors in Modern C++ here are some examples of how to use RGB or ARGB colors in C++. After that, you can modify your code as below. Here is a full C++ example of to change the background color of a component in an FMX C++ application. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 #include #pragma hdrstop #include “Component_Background_Color_Unit1.h” //————————————————————————— #pragma package(smart_init) #pragma resource “*.fmx” TForm1 […]

Read More

Let Stack Overflow Know You Use RAD Studio With Delphi

Hello fellow developers. The hugely important Stack Overflow site is currently running their annual survey of developer tools. Delphi is listed among the choices. It would be really helpful if you could visit the survey and let Stack Overflow know that you’re a RAD Studio with Delphi user. Whether you use one of the paid editions or the recently announced version 11 Community Edition it all counts. Delphi is very good at working away silently and trouble-free in the background, powering all sorts of parts of commerce, apps, and vital infrastructure. The fact that Delphi apps are immensely stable and don’t keel over just because something on the computer was changed or upgraded is a huge benefit – but it’s also a curse. It can lead to the language being ‘silently successful’. To paraphrase Oscar Wilde, “there is only one thing worse than being talked about, and that is not being talked about“. The Stack Overflow survey also has a spot to indicate that you use RAD Studio, so C++ Builder also counts too. So, please, go to the following link and let everyone know that you’re a Delphi user. It’s anonymous and only takes a few minutes. The figures are aggregated so nobody will actually know – but every single vote counts. The survey closes on May 19th so the sooner you can take the survey, the better. Here’s the survey: https://meta.stackoverflow.com/questions/424565/take-the-2023-developer-survey Marco has written a blog about the survey too. I am also very grateful to Darian Miller, one of our excellent MVPs who managed to electronically poke me as soon as I took over from Jim McKeeth and reminded me about the survey. Darian has his own take on the survey here: https://www.ideasawakened.com/post/2023-stack-overflow-developer-survey-includes-delphi-place-your-vote-today If you can find the time to complete the survey you’ll be helping both your fellow Delphi developers and those people who are considering development for the first time. Free Delphi Community Edition   Free C++Builder Community Edition

Read More

5 Modern C++ Posts That Can Be Used With C++ Builder 11 CE

Hello C++ developers, C++ students, and C++ educators. We recently had another milestone for the C++ programming language with a free version of C++ Builder, C++ Builder 11 CE Community Edition released in April 2023. If you are a start-up developer, student, hobbyist or just interested in learning to code then C++ Builder Community Edition may well be just the thing for you. Read the FAQ notes on the CE license and then simply fill out the form and download C++ Builder 11 CE. Table of Contents Where can I learn to program in C++ for free? What is new in C++ Builder CE? What are the important features of C++ that can be used with C++ Builder CE? Learn C++ Builder CE with C++ examples Get in touch and tell us what you’d like to see on the blogs What might be next for C++ Builder? Where can I learn to program in C++ for free? If you don’t know anything about C++ or the C++ Builder IDE, don’t worry, we have a lot of examples on the LearnCPlusPlus.org website and they’re all completely free. Just visit this site and copy and paste any examples there into a new Console, VCL, or FMX project, depending on the post example. We keep adding more C and C++ posts with sample code. In today’s round-up of recent posts on LearnCPlusPlus.org, we have new C and C++ posts with very simple examples that can be used with the following: The free version of C++ Builder 11 CE Community Edition. or a full paid version of C++ Builder and RAD Studio. or free BCC32C C++ Compiler and BCC32X C++ Compiler. or the free Dev-C++. What is new in C++ Builder CE? C++ Builder 11 CE, the free Edition of C++ Builder, has been recently released. Embarcadero has made available a Community Edition license for the most recent 11.3 release of Delphi and C++Builder. This is a free edition of either Delphi or C++Builder for students, hobbyists, and startups (as the license is revenue-limited). There is also a new Delphi CE version 11 edition. The C++ CE version and Delphi CE version cannot exist on the same machine. The full commercial versions of RAD Studio with Delphi and C++ Builder can co-exist though, and, in fact, RAD Studio can choose between the “C++ personality” and “Delphi personality” so you can use it for both languages as your needs dictate. What are the important features of C++ that can be used with C++ Builder CE? C++ is a very capable, versatile, and powerful programming language that has a very strong compiler supported by a big community on a range of different platforms. The C++ language definitions, syntax, and functionality are organized into different standards. Those standards are usually named after the year the standard was adopted such as 1998 for C++98, 2011 for C++11, 2014 for C++14, and 2017 for C++17. One of the great features of a C++ compiler is you can choose which standards you want your code to be compiled against, before the compilation of your source code. This allows the compiler to check that your code complies with that standard. In the first post, we explain what the standards are, how you can view them, how you can check the compatibility of your C++ source code against […]

Read More

C++20 Support Comes To C++/CLI

We’re pleased to announce the availability of C++20 support for C++/CLI in Visual Studio 2022 v17.6. This update to MSVC was in response to feedback received from many customers via votes on Developer Community and otherwise. Thank you! In Visual Studio 2022 v17.6, the use of /clr /std:c++20 will no longer cause the compiler to emit a diagnostic warning that the compiler will implicitly downgrade to /std:c++17. Most C++20 features are supported with the exception of the following: Two-phase name lookup support for managed templates. This is temporarily on hold pending a bugfix. Support for module import under /clr. Both the above are expected to be fixed in a near-future release of MSVC. The remainder of this blog post will discuss the background details, limitations, and caveats of C++20 support for C++/CLI. Brief history and background of C++/CLI C++/CLI was first introduced as an extension to C++98. It was specified as a superset of C++98 but soon with the introduction of C++11, some incompatibilities appeared between C++/CLI and ISO C++, some of which exist to this day. [Aside: nullptr and enum class were originally C++/CLI inventions that were migrated to ISO C++ and standardized.] With the further introduction of C++14 and C++17 standards, it became increasingly challenging to support the newer language standards and eventually due to the effort required to implement C++20, we decided to temporarily limit standard support to C++17 in /clr mode. A prime reason for this was the pause in the evolution of the C++/CLI specification, which has not been updated since its introduction and therefore could not guide the interaction of C++/CLI features with the new features being introduced in ISO C++. The design rationale for C++/CLI is spelled out in this document. Originally envisioned as a first-class language for .NET, C++/CLI’s use has primarily fallen into the category of interop, which includes both directions from managed to native and vice versa. The demise of C++/CLI has been predicted many times, but it continues to thrive in Windows applications primarily because of its strength in interop, where it is very easy to use and hard to beat in performance. The original goals spelled out in the C++/CLI Rationale were: Enable C++/CLI as a first-class programming language on .NET. Use the fewest possible extensions. ISO C++ code “just works” and conforming extensions are added to ISO C++ to allow working with .NET types. Be as orthogonal as possible: if feature X works on ISO C++ types, it should also work on C++/CLI types. With the specialization of C++/CLI as an interop language, the ECMA specification for it was not updated to keep up with fast evolving .NET features with the result that it can no longer be called a first-class language on .NET. While it can consume most of the fundamental types in the .NET base-class library, not all features are available due to lack of support from C++/CLI. This has resulted in both /clr:safe (allow only the “safe” CLS subset of CLI, disallowing native code) and /clr:pure (compile everything to pure MSIL code) to be deprecated. The only options supported currently are /clr, which targets the .NET Framework, and /clr:netcore which targets NetCore. In both cases, compilation of native types and code, and interop are supported. Goal (2) was originally achieved nearly perfectly in C++98 […]

Read More

Visual Studio 2022 version 17.6 for C++ Developers

We are happy to announce that Visual Studio 2022 version 17.6 is now generally available! This post summarizes the new features you can find in this release for C++. You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio Learn page. You’re used to debugging your C++ code with a lot of help from the IDE, but what about your build system? You can use the new CMake Debugger to debug your CMake scripts at configure time. You can set breakpoints based on filenames, line numbers, and when CMake errors are triggered, and can view call stacks of filenames and watch defined variables. Furthermore, the locals window will track CMake variables, targets, and tests. We’ve added a new Remote File Explorer feature. With this you can browse, upload, and download files to your remote machine listed in the Connection Manager, directly from Visual Studio. You can now use the Create Member Function feature to quickly add constructors and equality operators to your classes. When you have a class with member data, three dots will appear under the class name, and hovering over them will display a screwdriver icon. The drop-down from the screwdriver icon will display the new member function suggestions. With this, you can add a default constructor, constructor with all fields, equality operator, and equality operator with all fields.  You can learn more about this feature in our Create C++ Member Function in Visual Studio blog post. We made improvements to the Solution – Close scenario, which makes closing a solution containing C++ projects faster. The overall perf improvements can make closing a solution in some cases from 20% faster for small codebases, to 50% faster in some cases for large solutions (1000+ projects). We expect the wins to be more noticeable in large projects. For Chromium, the improvements are typically 50% faster, saving 20 seconds of time. The Visual Studio Installer now lets you install Incredibuild 10, which comes with a host of new features, including new build cache technology, an improved license management system, and cloud optimization. You can find out more about these features and how you can use them in our Even faster builds with Incredibuild 10 and Visual Studio 17.6 Preview 3 blog post. We have added initial support for C++20 mode in C++/CLI projects. All C++20 headers can be #included in a /clr compilation without restrictions. You can find out more details in our C++20 Support for C++/CLI blog post. We continue to work on C++23 support in our standard library, as well as improving our support for existing standards. Many of these features have been contributed by you folks in the community: thank you! You can find the full changelist on the Microsoft STL GitHub page. Here are some highlights: P1223R5 ranges::find_last, ranges::find_last_if, ranges::find_last_if_not P2321R2 views::zip_transform P2474R2 views::repeat P2505R5 Monadic Functions for expected Activated the vectorized implementations of find(), count(), ranges::find(), and ranges::count() for more scenarios involving pointer elements. Added visualizers for error_category and error_code. Improved the output of source_location::function_name(). It now includes both function parameter types and template arguments. Visual Studio 2022 version 17.6 comes with built-in support for HLSL and a new tool to view Unreal Engine logs. HLSL (High Level Shading Language) is a DirectX-specific programming language used to create shaders in game development and rendering applications. The popular HLSL Tools extension by […]

Read More