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?"
Hi you can add class witch create cpp and h files.. if it helps to you
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.
精彩评论