visual-studio-2015

How to output new line in Visual Studio actions?

流过昼夜 提交于 2020-06-25 10:30:56
问题 I add a break point in Visual Studio 2015, with an action to output a string to Output Window . There will be an auto-added line break at the end. Problem is, my previous output message(which is not output by break point) has no line break. So I want to add new line character at the beginning of my string, to avoid it messing up with my previous message. I tried to add \n , but the \n outputs as it is, without being escaped . How to add a new line character in break point's action? 回答1: Here

Stroustrup: For C++, how do I install FLTK library?

假装没事ソ 提交于 2020-06-23 04:37:47
问题 Question: Can someone give me instructions on how to install FLTK for Microsoft Visual Studio 2015, so that I can use FLTK for C++? Extra Information: the Chapter 12 drill, in Bjarne Stroustrup's Programming: Principle and Pracice using C++ wants me to install FLTK. I have Microsoft Visual Studio 2015. I downloaded the files at www.stroustrup.com/Programming/FLTK. Then I opened the fltk.dsw in C://Program Files (x86)/Microsoft Visual Studio 14.0/VC. But the build failed. I searched this

Where to find “Enable Debugging of Unmanaged Code” to be able to edit the code while the system is running?

别来无恙 提交于 2020-06-14 04:35:13
问题 In an older version of Visual Studio (Like the one at home, guess 2013), I am able to edit my code while the system is running but I can't continue (and I don't want to continue). While step-ping through my code, I just want to start typing and once I finish editing then to recompile. The advantage is that while typing I can hoover my mouse and watch values/structures of the variables and edit according. It's a nice guide sometimes, like a reminder or notes. Why my Visual Studio 2015 prevents

ucrtbase.dll: An invalid parameter was passed to a function that considers invalid parameters fatal

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-01 03:19:25
问题 I'm currently working on a personal project with OpenCV and I have a few issues during the execution of the program. After implementing an AKAZE + BOW recognizer (which didn't seem to work well enough for my problem) I wanted to try out a SIFT (and eventually SURF) implementation. For my project I'm following this one found on github and I'm using VS2015 (community) and OpenCV 2.4.13 over Windows 10. The issue I'm having, as stated in the title, lies with the ucrtbase.dll which gets an

Go To Controller shows “Unable to find a matching controller.” error

落爺英雄遲暮 提交于 2020-05-28 12:02:21
问题 In VS 2015, for my Web.API project, I installed MVC 5 from nuget via npm. This installation added references and generated web.config file under Views folder. I added new Controller with generated CRUD functions. When I right click and go to View on action it goes with no problem. But reverse action does not work. If I navigate to view via browser it works as well. Web app compiles as well. Is there any way for me to fix this navigation problem in VS? Did I forget to add something? Following

Handing over locked std::unique_lock to new threads

谁都会走 提交于 2020-05-27 07:26:10
问题 Consider the following example where I create a std::mutex , lock it and then hand the lock over to another thread : #include <future> #include <mutex> int main() { // Create and lock a mutex std::mutex mutex; std::unique_lock<decltype(mutex)> lock(mutex); // Hand off the lock to another thread auto promise = std::async(std::launch::async, [lock{ std::move(lock) }]() mutable { // Unlock the mutex lock.unlock(); }); promise.get(); return 0; } The example seems to run fine with gcc 6.3 but

Handing over locked std::unique_lock to new threads

丶灬走出姿态 提交于 2020-05-27 07:24:40
问题 Consider the following example where I create a std::mutex , lock it and then hand the lock over to another thread : #include <future> #include <mutex> int main() { // Create and lock a mutex std::mutex mutex; std::unique_lock<decltype(mutex)> lock(mutex); // Hand off the lock to another thread auto promise = std::async(std::launch::async, [lock{ std::move(lock) }]() mutable { // Unlock the mutex lock.unlock(); }); promise.get(); return 0; } The example seems to run fine with gcc 6.3 but

Does typescript have an option to disallow “any” when declaring or cast/conversion?

泄露秘密 提交于 2020-05-27 05:36:08
问题 I'm using TypeScript version 1.8.10 in Visual Studio 2015. In tsconfig.json I have those settings as "compilerOptions": { "target": "es6", "module": "system", "moduleResolution": "node", "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": true, "noImplicitAny": true, "noEmitOnError": false, "noImplicitUseStrict": false, "declaration": false, "inlineSourceMap": true, "inlineSources": true }, I'm wondering is is there a setting that disallow the use of "any" and

VS2015: [C6386] Buffer Overrun while writing (even for same index value)

落爺英雄遲暮 提交于 2020-05-26 06:35:02
问题 I'm trying to implement merge sort in C when I came across something interesting raised by [Analyze -> Run Code Analysis] in Visual Studio 2015. The code is as follows: void MergeSort_r(int A[], int n) { // A = {1, 3, 2} // n = 3 int rightCount; int* R; if ( n < 2 ) return; // version 1: rightCount = 2 rightCount = n - (n/2); // version 2: rightCount = 2 rightCount = n - 1; R = ( int* ) malloc( rightCount * sizeof( int ) ); if ( R ) { for ( int i = 0; i < rightCount; i++ ) { R[i] = A[i]; }

VS2015: [C6386] Buffer Overrun while writing (even for same index value)

好久不见. 提交于 2020-05-26 06:34:17
问题 I'm trying to implement merge sort in C when I came across something interesting raised by [Analyze -> Run Code Analysis] in Visual Studio 2015. The code is as follows: void MergeSort_r(int A[], int n) { // A = {1, 3, 2} // n = 3 int rightCount; int* R; if ( n < 2 ) return; // version 1: rightCount = 2 rightCount = n - (n/2); // version 2: rightCount = 2 rightCount = n - 1; R = ( int* ) malloc( rightCount * sizeof( int ) ); if ( R ) { for ( int i = 0; i < rightCount; i++ ) { R[i] = A[i]; }