visual-c++

funny looking comments - c++

时光毁灭记忆、已成空白 提交于 2021-01-19 22:35:58
问题 when i read through source files of opensource projects i often come across some weird phrases in the comments /* @brief ...... @usage..... @remarks.... @par.... */ questions 1.What are they?(were not mentioned when i was learning c++) 2.Do they have any documentation(where) 回答1: They are just comments and as such have no special meaning in C++. They are probably to allow a documentation generator (For example Doxygen) to extract the data from the comments. 回答2: Those are for some flavour of

funny looking comments - c++

两盒软妹~` 提交于 2021-01-19 22:31:50
问题 when i read through source files of opensource projects i often come across some weird phrases in the comments /* @brief ...... @usage..... @remarks.... @par.... */ questions 1.What are they?(were not mentioned when i was learning c++) 2.Do they have any documentation(where) 回答1: They are just comments and as such have no special meaning in C++. They are probably to allow a documentation generator (For example Doxygen) to extract the data from the comments. 回答2: Those are for some flavour of

I tried to add a new template helper function to my class and now I get a LNK2001 error. How to fix?

不羁岁月 提交于 2021-01-07 02:52:47
问题 I asked a couple of questions recently on StackOverflow to see if I could consolidate some functions into one by making use of templates. Those questions were: Can these methods that convert safe arrays into std::list objects be turned into a template function? Can this template function be adapted to account for the following method? I had one more function to try and update so I thought I would give it a go myself. This was the function to update: void CMSATools::ConvertSAFEARRAY_DATE

I tried to add a new template helper function to my class and now I get a LNK2001 error. How to fix?

旧街凉风 提交于 2021-01-07 02:52:36
问题 I asked a couple of questions recently on StackOverflow to see if I could consolidate some functions into one by making use of templates. Those questions were: Can these methods that convert safe arrays into std::list objects be turned into a template function? Can this template function be adapted to account for the following method? I had one more function to try and update so I thought I would give it a go myself. This was the function to update: void CMSATools::ConvertSAFEARRAY_DATE

How to make the current coding structure more flexible

那年仲夏 提交于 2021-01-01 09:38:29
问题 I need help with my current workflow , though everthing works as expected but i would like to make the structure more robust. I have a application where i change the data by string literal. WAVEFRONT*TREEVIEW*Main$Text*GEOMETRY*TEXT SET TEXT ABCD as shown in the image where "Main$Text" is the path of the data item the the tree structure. 1) First step-> i have a class to handle the command string and take appropriate action. int SumCommandInterface::receiveCommand(std::string stdtsrCommand ,

Microsoft Media Foundation Webcam Interface

纵然是瞬间 提交于 2020-12-31 13:58:19
问题 I've been working on a c++ interface to capture images from all types of webcams via the Micrsoft Media Foundation. I've already got a bit of code that can connect with several types of webcams and is able to capture images in different resolutions and formats. I know that under WinXP it is possible to change different parameters of the webcam (like white balance, exposure time e.g.) by using the Direct Show library. Unfortunately the interface in the Direct Show library that made it possible

Statically linking Winsock?

為{幸葍}努か 提交于 2020-12-30 03:48:13
问题 I'm using Winsock 1.1 in my project. I include wsock32.lib in "Additional Dependencies". I'm looking at the DLL project using depends.exe and notice that the DLL depends on wsock32.dll . How can I statically link it so that it doesn't depend on wsock32.dll ? 回答1: The short answer is that you can't. There is no static winsock library, you can only invoke wsock32.dll. Much the same way that you can't statically link to user32 or kernel32. There are things with wsock32.dll internally that are

Statically linking Winsock?

空扰寡人 提交于 2020-12-30 03:44:57
问题 I'm using Winsock 1.1 in my project. I include wsock32.lib in "Additional Dependencies". I'm looking at the DLL project using depends.exe and notice that the DLL depends on wsock32.dll . How can I statically link it so that it doesn't depend on wsock32.dll ? 回答1: The short answer is that you can't. There is no static winsock library, you can only invoke wsock32.dll. Much the same way that you can't statically link to user32 or kernel32. There are things with wsock32.dll internally that are

Move Semantics with unique_ptr

[亡魂溺海] 提交于 2020-12-29 05:55:19
问题 I am using Visual Studio 2012 Update 2 and am having trouble trying to understand why std::vector is trying to use the copy constructor of unique_ptr. I have looked at similar issues and most are related to not having an explicit move constructor and/or operator. If I change the member variable to a string, I can verify that the move constructor is called; however, trying to use the unique_ptr results in the compilation error: error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access

Possible to force CMake/MSVC to use UTF-8 encoding for source files without a BOM? C4819

半城伤御伤魂 提交于 2020-12-28 20:03:45
问题 All our source code is valid UTF-8, however some users on Windows cannot build them because their system is configured for a different encoding. Without adding a BOM to source files, is it possible to tell MSVC to treat all source as UTF-8, irrespective of the users system encoding? See MSDN's link regarding this topic (requires adding BOM header). 回答1: You can try: add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>") add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") By default,