Creating .cpp files from .h files visual studio

Shortcut: alt+shift+f10 (VS2015)

I’ve looked for this for over 10+ years, been told numerous times that nothing like this exists, and that one needs to somehow use external tools to get this basic functionality.

… Now, I’ve finally found something useful.

Highlight the class name in you .h file, and using that shortcut will make intellisense generate the relevant definitions (also creating the .cpp file if not created).

It’s also a general purpose shortcut that ex. creates method stubs for you, if you create function signatures in the header (and highlight the function name). As you can see from the screenshot below, it also allows you to auto create all virtuals from the parent class, etc.

I absolutely cannot believe how much this has suddenly improved productivity (goodbye manual copy paste!). And I find it utterly shocking how I have never seen / been given reference to this, even in Stack Overflow, up until this point.

Enjoy your new powers, and spread the word!

Revolution

Leave a Comment