Tag: visual studio

How to switch between a header file and implementation file in Visual Studio

Jaime 2011-04-25 No Comments Coding, Tip ,

There used to be a button that would toggle you between the header file and implementation file that currently had the focus in Visual Studio. For reasons unknown to me, that feature was taken out in Visual Studio. Here is a macro though that brings that functionality back: I want my toggle button back!

Copying a project file to a known location

Jaime 2011-04-22 No Comments Coding, Tip , ,

Within a Visual Studio C++ solution, you can copy a file to a known location as part of the build process. To do that, you have so set the “Custom Build Step” parameters found in the Visual Studio project’s property page: Command line: copy “$(InputPath)” “$(TargetDir)” > nul Description: Copying $(InputFileName) Outputs: $(TargetDir)$(InputFileName) Note, the […]

Using regular expressions with Visual Studio

Jaime 2011-02-28 No Comments Coding ,

Today, I began using regular expressions to change a whole bunch of code. However, what I learned from using RegEx in TextMate was not the same as in Visual Studio. So, for example, the parenthesis around regular expressions to indicate a backreference in TextMate:     (\w+) is represented by curly braces in VS:     {\w+} And to […]

Preventing Visual Studio from defining min and max

Jaime 2010-11-05 No Comments Coding ,

To prevent Visual Studio from defining it’s own min and max functions, include the following in the top of your implementation file: ?View Code C#ifdef _WIN32 #ifndef NOMINMAX #define NOMINMAX #endif #endif You can also define NOMINMAX in the Preprocessor Definitions option in the Common Properties->C/C++->Proprocessor property page.

Page 1 of 2