Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding header & implementation file at the same time

I'm sure I'm not the only one with this issue, but I couldn't manage to find a question for it. So I want to add a new unit to my project, the process goes like right click project -> Add -> New Item -> Type in name -> Select .h as type -> Hit Ok. Then repeat the whole process again for the cpp file. The logical choice would be to have a multi select support for the file type selection, but this isn't the case at least in VS 2008. I can see one reason for not having multi select, and that is because the dialog would have to be slightly smarter / different, as the location path often wouldn't be identical.

My question naturally becomes: "Is there a better / quicker way to add a cpp file & corresponding header file in VS?"

like image 305
Ylisar Avatar asked Oct 20 '25 14:10

Ylisar


2 Answers

Hi you can add class witch create cpp and h files.. if it helps to you

like image 178
Sanja Melnichuk Avatar answered Oct 22 '25 02:10

Sanja Melnichuk


Doing things the way your'e doing them, I think the answer is no. You have to create one file at a time. This makes sense to me since you will often not create CPP and H files on a one-to-one basis.

Otherwise, you can use VS's class wizard, which will create the files and write some skeleton code for you.

like image 43
John Dibling Avatar answered Oct 22 '25 03:10

John Dibling



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!