[英]How do I create a new “header file (.h)” in an existing “C++ Project” in “Microsoft Visual Studio Community 2015”?
I can create such a file by opening a separate instance of studio, but I can't get my project to recognize it as an essential file in the side panel. 我可以通过打开Studio的单独实例来创建这样的文件,但是在侧面板中无法使我的项目将其识别为必不可少的文件。 I would prefer an answer by using studios own UI to create the file, but importing it will work as well if possible. 我希望通过使用工作室自己的UI来创建文件的答案,但如果可能的话,将其导入也可以。
Note: I need an answer to Visual Studio year 2015. I have read that major program changes have been made since 2012/2013 and thus such solutions will probably not work. 注意:我需要2015年Visual Studio的答案。我已经阅读到自2012/2013年以来对程序进行了重大更改,因此此类解决方案可能无法使用。
Right click on your project in project explorer (normally on the right) and choose Add new item...
右键单击项目浏览器中的项目(通常在右侧),然后选择Add new item...
Select C++ header file there. 在此处选择C ++头文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.