It can, therefore, deduce the full path of the file and open it even if it is in a different directory as the active document. Switch_H_CPP looks for a matching counterpart by walking through all the loaded project files. Whereas simpler macros get this job done more efficiently (see the above), they do not work if the header files and source files are not stored in the same directory. The Switch_H_CPP macro switches between the active document (either source file or header file) and its counterpart (either header file or source file). This macro simply switches between a *.h file and a *.cpp file, without any errors (if the *.h or the *.cpp file does not exist). This is a modification for Visual Studio.
Although the built-in commands are sufficient for some projects, the Visual Assist version of GoTo Implementation generally provides better accuracy and. NET by Pavel Sokolov, Pierre Arnaud Pavel Sokolov's SolutionĪ simple macro that allows you to quickly switch between the associated header and implementation files. Visual Assist versus Visual Studio Most Microsoft IDEs include commandsGo to Definition and Go to Declarationthat are similar to the GoTo Implementation command of Visual Assist.
It's easy to write a macro that does it: Switch between Header and CPP File for Visual Studio.