Visual Studio no longer generates Constructor/Deconstructor when creating class?

Viewed 1135

so before whenever I created a class in VS19, it would do the following.

//.h
#pragma once
class Game {
     Game();
     ~Game();
};

//.cpp
#include "Game.h"

Game::Game() {
}

Game::~Game() {
}

However, now it does the following

//.h
#pragma once
class Game {

};

//.cpp
#include "Game.h"

And this may be a stupid thing and you may ask "Are you really that lazy to write that code?" And the answer is well, yeah. I liked it when VS19 created it automatically because it was another thing I would not have to worry about making. I could just quickly start the class. So I'm asking, is there somewhere in the VS19 options bar that activates this again?

1 Answers

This change is the default behavior and there is no such setting in vs2019. You can create a class, write the constructor and destructor, and then export it as a template, then you can use this template in add new item. How to: Create item templates

Related