Adding a header file and implementation at the same time

I am sure that I am not the only one in this matter, but I could not find the question. So I want to add a new unit to my project, the process goes like a right-click project → Add → New item → Enter a name → Choose .h as type → Hit Ok. Then repeat the whole process for the cpp file. A logical choice would be to have multiple choice support for choosing a file type, but this is not the case, at least in VS 2008. I see one reason for the lack of multiple choice, and this is because the dialogue would have to be a little smarter / different, because the location path will often not be identical.

My question naturally becomes: "Is there a better / faster way to add the cpp file and the corresponding header file to VS?"

+3
source share
2 answers

Hi, you can add a class that creates the cpp and h files .. if that helps you

+3
source

By doing things the way you do them, I think the answer is no. You must create one file at a time. This makes sense to me, because you often don't create CPP and H files on a one-to-one basis.

Otherwise, you can use the VS class wizard, which will create the files and write you some skeletal code.

+1
source

Source: https://habr.com/ru/post/1775643/


All Articles