0

I want the following code to appear every time I create a new blank C++ file:

#include<bits/stdc++.h>

int main(){
    /* code here */

    return 0;
}

I know I can create a new user snippet but is there a way to automatically insert it on a new black C++ file without having to type anything?

(This can be also analogously extended to Java, C, and other languages)

Gaurang Tandon
  • 6,504
  • 11
  • 47
  • 84
  • I suggest to change your template file and [avoid ``](https://stackoverflow.com/questions/31816095/why-should-i-not-include-bits-stdc-h). – Jarod42 Oct 24 '18 at 08:59
  • [google's search](https://www.google.com/search?q=vs+code+template+new+file) give several extensions. – Jarod42 Oct 24 '18 at 09:11
  • I have searched in the propper VScode [documentation](https://code.visualstudio.com/docs/getstarted/settings) for settings but I do not think you can do it with VScode but an extension – M.K Oct 24 '18 at 09:15
  • @M.K thanks, I was also initially searching the docs. I will check out the extensions once. – Gaurang Tandon Oct 24 '18 at 10:02
  • @Jarod42 thanks, I will check out the problem with bits/stdc++.h – Gaurang Tandon Oct 24 '18 at 10:02

0 Answers0