0

I have been preparing for a coding competition, so I decided to make a VS project template in order to not be having to copy-pase the standard include statements into every new solution file.

After some research, I figured out how to get this done, however, there is one little thing that still bothers me. When loading the -standard- console application template, the source file is automatically opened. However, when creating a source file form my own template, I have to open the cpp source file manually the first time I am working on the code.

Is there any way I can change the template file such that my source file is automatically opened when starting a new project based upon this template?

I am using visual studio 2019

Yori
  • 11
  • 2
  • Just out of curiosity, what are the standard `include`s you would always use? – Yunnosch Jan 30 '21 at 08:52
  • Just stuff like ```#include ``` and ```#include ``` I tried ```#include ```, but sadly that doensn't work in visual studio. It is not only the include statements, also (perhaps later when I am more advaced) some frequently used functions as well. – Yori Jan 30 '21 at 08:56
  • 1
    Oh dear, that is what I worried.... https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h – Yunnosch Jan 30 '21 at 09:06
  • Haha, yes indeed, when I was looking why it didn't work, i found everybody saying 'dont do this'. Therefore, i decided to skip ``````, and use the libraries one at a time, ¯\\_(ツ)_/¯ – Yori Jan 30 '21 at 09:16

0 Answers0