visual-studio

listing files in a folder using C in Windows

喜欢而已 提交于 2021-02-05 09:38:05
问题 I want to list the files in this folder "C:\home\WORK\Desktop\Communication". There are ten files in this folder. My code has no error but it's not printing anything. What is my mistake ? #include<stdio.h> #include<Windows.h> #include<string.h> int main(int argc,char *argv[]) { char path[]="C:\\home\\WORK\\Desktop\\Communication"; strcat_s(path,sizeof(path),"\\*"); WIN32_FIND_DATA fdata; HANDLE hFind =INVALID_HANDLE_VALUE; int numberOfFiles=0; char *files[10]; hFind = FindFirstFile(path,

Service-Based Database File Missing

感情迁移 提交于 2021-02-05 07:49:26
问题 So I've been having problems with this tutorial for SQL on the MDSN website. The first picture says what it should like to add a new file to the project but when I try to repeat the instruction on VS the service based database file is missing. Does anybody know what I should do? 回答1: Please try to this way: Go to Control Panel -> Uninstall a Program, select Visual Studio 201x, right click, Change -> Modify, and check whether you have installed "Microsoft SQL Server Data Tools", if you didn't

Using C# Regular expressions how do i match the vertical bar as a literal?

徘徊边缘 提交于 2021-02-05 06:38:50
问题 I'm writing a program in C# using Microsoft Visual Studio, i need the program to match the vertical bar, but when I try to escape it like this "\|" it gives me an unrecognized escape sequence error. What am I doing wrong? 回答1: In C# string test = "\|"; Is going to fail because this is a C# string escape sequence, and no such escape exists. Because you are trying to include a backslash in the string, you need to escape the slash so the string actually contains a slash: string test = "\\|";

CS0649 error in C#

£可爱£侵袭症+ 提交于 2021-02-05 05:36:00
问题 There's a bug in the code somewhere that I can't find, some variables simply don't work somehow. The warning I get: CS0649 Field 'Calculations.A' is never assigned to, and will always have its default value 0 ABC-Formule [path]\Calculations.cs CS0649 Field 'Calculations.B' is never assigned to, and will always have its default value 0 ABC-Formule [path]\Calculations.cs CS0649 Field 'Calculations.C' is never assigned to, and will always have its default value 0 ABC-Formule [path]\Calculations

CS0649 error in C#

时光怂恿深爱的人放手 提交于 2021-02-05 05:35:47
问题 There's a bug in the code somewhere that I can't find, some variables simply don't work somehow. The warning I get: CS0649 Field 'Calculations.A' is never assigned to, and will always have its default value 0 ABC-Formule [path]\Calculations.cs CS0649 Field 'Calculations.B' is never assigned to, and will always have its default value 0 ABC-Formule [path]\Calculations.cs CS0649 Field 'Calculations.C' is never assigned to, and will always have its default value 0 ABC-Formule [path]\Calculations

How can I tell Visual Studio to NOT BREAK on a particular exception?

a 夏天 提交于 2021-02-04 22:14:24
问题 I have a particular type of exception that I would like Visual Studio to not break on and show the Exception Assistant screen. Essentially I would like it just to let my normal exception handling infrastructure deal with it. The exception is an inheritor of System.Exception which I wrote and have the source code for. Any where this is thrown I want VS to not catch it, ie it is not useful to just supress a single throw new BlahException(); in code. This is because the exception is thrown a lot

How can I tell Visual Studio to NOT BREAK on a particular exception?

懵懂的女人 提交于 2021-02-04 22:12:40
问题 I have a particular type of exception that I would like Visual Studio to not break on and show the Exception Assistant screen. Essentially I would like it just to let my normal exception handling infrastructure deal with it. The exception is an inheritor of System.Exception which I wrote and have the source code for. Any where this is thrown I want VS to not catch it, ie it is not useful to just supress a single throw new BlahException(); in code. This is because the exception is thrown a lot

Why are content files from NuGet packages added as links in .NET Core projects and how can you prevent that?

余生长醉 提交于 2021-02-04 21:48:57
问题 I am developing a .NET Standard library and plan to use it in both .NET Core and .NET Framework projects. My library is dependant on a third library which itself is dependant on a few C binary files. The C binary files have to be copied to the output directory of the project which will be referencing my library. I added the binary files to my library project as content and they are copied to the content and contentFiles directories when the NuGet package is packed with the dotnet pack command

How to build as an ia32 solution from visual studio using cmake

僤鯓⒐⒋嵵緔 提交于 2021-02-04 21:28:32
问题 I have a module project using cmake with the following configuration: cmake_minimum_required(VERSION 3.13) project(app) set(CMAKE_CXX_STANDARD 11) add_library(app MODULE src/library.cpp src/library.h) Once solution generated using cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release , I can find an app.sln solution. I open it with Visual Studio 2019 and click on the button Local Windows Debugger . I can see also a drop-down menu containing the value x64 and an item

How to build as an ia32 solution from visual studio using cmake

纵饮孤独 提交于 2021-02-04 21:28:29
问题 I have a module project using cmake with the following configuration: cmake_minimum_required(VERSION 3.13) project(app) set(CMAKE_CXX_STANDARD 11) add_library(app MODULE src/library.cpp src/library.h) Once solution generated using cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release , I can find an app.sln solution. I open it with Visual Studio 2019 and click on the button Local Windows Debugger . I can see also a drop-down menu containing the value x64 and an item