Microsoft Q&A

C++

2,946 questions

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

Browse all C++ tags

2,946 questions with C++-related tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

Service does not enter the event loop issue

I used the old QtService code from: https://github.com/qtproject/qt-solutions/tree/master/qtservice and created a service to run npm start command which will start my website on Windows startup. When adding -exec argument, starting in app mode it works…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-19T14:13:18.5666667+00:00
Ruslan Sydorovych 86 Reputation points
accepted 2023-06-23T19:13:01.95+00:00
Ruslan Sydorovych 86 Reputation points
1 answer One of the answers was accepted by the question author.

In a console application, can I use cin to input character strings with space characters in them?

I have a novice question which didn't appear in the Q&A listing. In a console application, can I use CIN to input character strings that have space characters in them?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-21T20:08:39.16+00:00
Joseph Klasen 146 Reputation points
commented 2023-06-23T17:20:56.9433333+00:00
Barry Schwarz 831 Reputation points
2 answers

C++ dialog-box to choose a file

Dear C++ experrts, I am developing a C++ code on Windows 10. It deals with all files with the extension .lan in a directory. At present the directory pathname is hardcoded. I want the code to pop up a dialogue box that shows all the files in the…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-23T14:43:48.4566667+00:00
mauede 161 Reputation points
answered 2023-06-23T15:34:39.8566667+00:00
RLWA32 32,336 Reputation points
1 answer

compiler limit: string exceeds 65535 bytes in length

Hi There, I had encountered the following error on Visual studio 2017, "fatal error C1091: compiler limit: string exceeds 65535 bytes in length," I have exceeded the maximum allowed length for a string in the Visual Studio 2017 compiler.…

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
781 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
291 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
7,749 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,266 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-22T15:05:54.68+00:00
Sathish 0 Reputation points
answered 2023-06-23T14:52:39+00:00
Limitless Technology 29,836 Reputation points
1 answer

C++ AccessibleObjectFromWindow always return 0

Hello guys, I'm new developer windows. I want to get ROLE_SYSTEM_TEXT of application in window but I got trouble with function AccessibleObjectFromWindow I read the docs and try to use this fuction but it not work Please help me fix it. This is…

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,089 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-23T04:28:31.2133333+00:00
Phan Hoài Sơn 20 Reputation points
commented 2023-06-23T09:54:54.58+00:00
Phan Hoài Sơn 20 Reputation points
1 answer

What is the license terms for "example code" in learn.microsoft

Hello All, I would like to know the licensing terms of "example code" mentioned in learn.microsoft for different articles. More specific, in the below link where there is an example code - "This example calls the GetLogonSID and…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-22T09:14:59.47+00:00
Kiran Aluka 0 Reputation points
edited an answer 2023-06-23T02:05:08.6533333+00:00
Minxin Yu 5,431 Reputation points Microsoft Vendor
0 answers

Is it explicit or implicit type conversion?

When a format specifier of a type that is different from the variable is used with printf to show a value of another data type then it's implicit type conversion or explicit one? #include <stdio.h> int main() { double a = 3.5; int b = 6; …

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,266 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-22T09:42:38.72+00:00
Debojit Acharjee 160 Reputation points
commented 2023-06-23T01:17:59.8833333+00:00
Minxin Yu 5,431 Reputation points Microsoft Vendor
2 answers

Why all the characters of an array are not printed?

The following program uses an array of size 10 is assigned with a '-' character and then takes a string "hello" from the user input, but while printing the array it only shows the word "hello". Whereas, it shows all the 10 characters…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,266 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-21T11:26:09.67+00:00
Debojit Acharjee 160 Reputation points
answered 2023-06-22T17:17:47.33+00:00
Giovanni Dicanio 160 Reputation points
1 answer

How to calculate offset for containing file inside orphaned child VHD?

I have an orphaned child vhd(differencing Vhd). In c++ code, I wanted to parse the byte stream and identify the files in it. Is there any way to locate offset for file?

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,095 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
7,749 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-22T06:18:46.7766667+00:00
ad1601 0 Reputation points
answered 2023-06-22T12:53:19.23+00:00
Limitless Technology 29,836 Reputation points
1 answer

How can I install older version of MSVC - Microsoft Visual C++ Compiler

I want to install MVSC 14.33.31629 However currently it is installing only 14.36.32532 Anyway to install older versions somehow? Installing from the VisualStudioSetup.exe

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,266 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
798 questions
asked 2023-06-21T22:22:14.35+00:00
Furkan Gözükara 1 Reputation point
answered 2023-06-22T06:15:07.9333333+00:00
Tianyu Sun-MSFT 17,586 Reputation points Microsoft Vendor
1 answer

CaptureElement not found in WinUI 3

Pls try the below link: https://learn.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.captureelement Equivalent WinUI class: Microsoft.UI.Xaml.Controls.CaptureElement. 404 - Page not found Hmm, we couldn't find this link,…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2021-05-25T02:08:40.877+00:00
Henry Zhou 1 Reputation point
answered 2023-06-22T06:07:19.64+00:00
Castorix31 72,391 Reputation points
1 answer

Visual Studio 2019 : full Standalone installation

I am looking for a full Standalone installation to Visual Studio 2019 (because no possibility to Internet connexion). Thx

.NET
.NET
Microsoft Technologies based on the .NET software framework.
1,237 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,149 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
798 questions
asked 2022-03-24T09:17:59.61+00:00
PACCAUT Johann 1 Reputation point
commented 2023-06-21T23:47:18.91+00:00
81892775 0 Reputation points
1 answer

Couldn't install Microsoft.Net.4.8.FullRedist.20H2 when I try to install Visual Studio

Something went wrong with the install. You can troubleshoot the package failures by: 1. Search for solutions using the search URL below for each package failure 2. Modify your selections for the affected workloads or components and then retry…

Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
798 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-01-01T14:02:37.867+00:00
Yicheng Zhou 1 Reputation point
edited an answer 2023-06-21T11:16:40.4633333+00:00
Tianyu Sun-MSFT 17,586 Reputation points Microsoft Vendor
17 answers

How to set font for single control in Dialog?

Hello everybody, I cannot set the font size for a single control in a Dialog Please help me. Greetings

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-16T16:22:01.3433333+00:00
giorgiogio48 0 Reputation points
answered 2023-06-21T09:57:32.3633333+00:00
_AW_ 6 Reputation points
1 answer

Begginer level C++ Socket transfer Server / Client

Hi! Can someone point me to a good and easy to follow tutorial/guide/project example for sockets (server + client, and I need multithreading for server)? For what I'm working on, I only need to transfer strings (it would be nice if you can send…

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
471 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-19T11:37:16.48+00:00
sValentin 1 Reputation point
edited a comment 2023-06-21T05:33:31.1433333+00:00
Minxin Yu 5,431 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

How to fix error atl/mfc atlcomcli.h line 291 vscode 2022

hello guys, I'm new developer and I want to get my active url for google chrome for my project tracking. I run code in this answer : https://stackoverflow.com/questions/48504300/get-active-tab-url-in-chrome-with-c But when run code, I got error from atl…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-20T09:34:40.05+00:00
Phan Hoài Sơn 20 Reputation points
accepted 2023-06-21T03:30:36.1+00:00
Phan Hoài Sơn 20 Reputation points
1 answer One of the answers was accepted by the question author.

How to run msvc link.exe from cmd line or system with spaces in library path?

I am trying to run msvc linker (link.exe) from C++ using system(). However, the library path I specify in /libpath: has spaces. I just read here that: "On the command line, an option consists of an option specifier, either a dash (-) or a forward…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,266 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-19T10:03:57.0333333+00:00
Mate 25 Reputation points
edited a comment 2023-06-20T22:01:56.5033333+00:00
Mate 25 Reputation points
0 answers

How to break up a long loop using a CDialog

If I have a long loop, is there any way to break it using a CDialog prompted to user ? Psuedocode: while (pRecordset->isEOF()) { // my custom code if (flag) break; } During this loop, I want to display to user a CDialog with a…

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-16T13:51:28.6266667+00:00
Flaviu_ 606 Reputation points
edited a comment 2023-06-20T09:10:12.3966667+00:00
Minxin Yu 5,431 Reputation points Microsoft Vendor
1 answer

How to modify the second parameter of PATHAPPEND with a user-defined variable? mine that is.

Question: I am trying to modify the second parameter of PATHAPPEND from "L "TEST" to a user-supplied variable that holds a directory address provided by the developer. Xiaopo Yang provided guidance on solving a problem with getting full…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
7,749 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,337 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,089 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,364 questions
asked 2023-06-19T22:14:06.1166667+00:00
Thad T 6 Reputation points
commented 2023-06-20T06:54:50.9833333+00:00
RLWA32 32,336 Reputation points
2 answers

How to gain full read/write access to user's AppData folder using a "C" program?

Question: I've tried several times to access the user's AppData area programmatically using MSVC 2019 "C" program, but I am unable to gain full read/write access to it. Though it's easy to manually put a file into the area, using a program…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,266 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,089 questions
Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,364 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
2,946 questions
asked 2023-06-18T19:02:24.4066667+00:00
Thad T 6 Reputation points
commented 2023-06-20T00:39:23.14+00:00
Xiaopo Yang - MSFT 7,181 Reputation points Microsoft Vendor