visual-c++

How is it possible to find all occurrences of a method if the Visual Studio „Find All References“ does not work?

[亡魂溺海] 提交于 2020-12-07 19:00:32
问题 The special case I am dealing with is to find all usages of the method CTime::Format in the entire solution. Please assume that the Visual Studio functionality „Find All References“ does - as suspected - not work. 回答1: In order to find all usages of the method CTime::Format follow the steps: Step 1: Replace the string CTime by the string CCTime in the entire solution. Step 2: Implement the following: #include "atltime.h" class CCTime : public CTime { public: [[deprecated("--> uses the method

How is it possible to find all occurrences of a method if the Visual Studio „Find All References“ does not work?

久未见 提交于 2020-12-07 18:53:38
问题 The special case I am dealing with is to find all usages of the method CTime::Format in the entire solution. Please assume that the Visual Studio functionality „Find All References“ does - as suspected - not work. 回答1: In order to find all usages of the method CTime::Format follow the steps: Step 1: Replace the string CTime by the string CCTime in the entire solution. Step 2: Implement the following: #include "atltime.h" class CCTime : public CTime { public: [[deprecated("--> uses the method

How is it possible to find all occurrences of a method if the Visual Studio „Find All References“ does not work?

狂风中的少年 提交于 2020-12-07 18:51:36
问题 The special case I am dealing with is to find all usages of the method CTime::Format in the entire solution. Please assume that the Visual Studio functionality „Find All References“ does - as suspected - not work. 回答1: In order to find all usages of the method CTime::Format follow the steps: Step 1: Replace the string CTime by the string CCTime in the entire solution. Step 2: Implement the following: #include "atltime.h" class CCTime : public CTime { public: [[deprecated("--> uses the method

Treat all warnings as errors, except some

北城余情 提交于 2020-12-05 08:45:37
问题 In the answer to this question, gcc treat all warnings as errors EXCEPT X it is shown how all warnings can be treated as errors except one. First we add the compiler flag that treats all warnings as errors: -Werror Then we add exceptions to the above rule (in this case error called deprecated ) -Wno-error=deprecated Is there a similar method in Microsoft Visual C++? 回答1: No. There was a user suggestion to add such a feature to Visual C++, but the item was closed by the Visual Studio Team

how to set default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton?

大城市里の小女人 提交于 2020-12-03 14:26:10
问题 how to give default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton? How the arguments should be passed? I tried like following code. CMFCEditBrowseCtrl py_file_path; py_file_path.EnableFileBrowseButton(_T"PY",_T"*.py"); But it is not displaying the .py files. It says "no items matches". I guess there is some problem with the lpszDefExt and lpszFilter values i use. Could anyone tell me what is the value of those arguments to list all .py files? 回答1: You need to set it like

how to set default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton?

Deadly 提交于 2020-12-03 14:21:32
问题 how to give default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton? How the arguments should be passed? I tried like following code. CMFCEditBrowseCtrl py_file_path; py_file_path.EnableFileBrowseButton(_T"PY",_T"*.py"); But it is not displaying the .py files. It says "no items matches". I guess there is some problem with the lpszDefExt and lpszFilter values i use. Could anyone tell me what is the value of those arguments to list all .py files? 回答1: You need to set it like

How to detect on C++ is windows 32 or 64 bit?

谁都会走 提交于 2020-12-02 23:36:51
问题 How to detect on C++ is windows 32 or 64 bit? I see a lot of examples in .Net but I need C++. Also IsWow64Process() dosen't works for me, becouse "If the process is running under 32-bit Windows, the value is set to FALSE. If the process is a 64-bit application running under 64-bit Windows, the value is also set to FALSE" if I have 32 bit proc under 32 bit OS I have FALSE if I have 64 bit proc under 64 bit OS I have FALSE BUT I dont care about process bit I need OS bit 回答1: The Win32 API

How to detect on C++ is windows 32 or 64 bit?

牧云@^-^@ 提交于 2020-12-02 23:20:23
问题 How to detect on C++ is windows 32 or 64 bit? I see a lot of examples in .Net but I need C++. Also IsWow64Process() dosen't works for me, becouse "If the process is running under 32-bit Windows, the value is set to FALSE. If the process is a 64-bit application running under 64-bit Windows, the value is also set to FALSE" if I have 32 bit proc under 32 bit OS I have FALSE if I have 64 bit proc under 64 bit OS I have FALSE BUT I dont care about process bit I need OS bit 回答1: The Win32 API

How to detect on C++ is windows 32 or 64 bit?

谁说胖子不能爱 提交于 2020-12-02 23:19:05
问题 How to detect on C++ is windows 32 or 64 bit? I see a lot of examples in .Net but I need C++. Also IsWow64Process() dosen't works for me, becouse "If the process is running under 32-bit Windows, the value is set to FALSE. If the process is a 64-bit application running under 64-bit Windows, the value is also set to FALSE" if I have 32 bit proc under 32 bit OS I have FALSE if I have 64 bit proc under 64 bit OS I have FALSE BUT I dont care about process bit I need OS bit 回答1: The Win32 API

Best practices for Unit testing with Catch2 in Visual Studio

丶灬走出姿态 提交于 2020-12-01 12:18:35
问题 I'm new to unit testing in C++ and want to get some advice on this. I use Visual Studio 2019 for development and I chose Catch2 as my testing library, I also got the Test Adapter for Catch2 installed. I read docs for both Catch2 and Test Adapter for Catch2 on GitHub, but I still cannot figure out a proper way to use unit test in Visual Studio. Let's assume that I already have a project with some classes in it and I want to test those classes. Should I put files with test code in the same