1

I mean we always get this code:

// ConsoleApplication1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


int main()
{
    return 0;
}

Is there any way to change this to another code? So when I start a new project I always want to get something like this:

#include "stdafx.h"
#include <iostream>   

using namespace std;

    int main()
    {
        return 0;
    }

I know it is not a big difference but I really don't want to edit always, it is boring sometimes

Imetomi
  • 13
  • 4
  • 1
    You might want to read [why using namespace std is bad practice](http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice) – rustyx Feb 21 '17 at 16:00
  • 1
    You want to put #include in the stdafx.h pre-compiled header, not somewhere else. – Scott Hutchinson Feb 21 '17 at 16:22
  • You could create your own stencils rather than Microsoft generating one for you. The advantage is that you get to use your coding standards rather than Microsoft's. Create the stencil files. Copy them before editing. – Thomas Matthews Feb 21 '17 at 18:23

1 Answers1

0

There's some documentation on the Microsoft web sites.

I think there's all you need starting from here:
https://learn.microsoft.com/en-us/visualstudio/ide/customizing-project-and-item-templates

roalz
  • 2,699
  • 3
  • 25
  • 42