简体   繁体   English

如何在“ Microsoft Visual Studio Community 2015”的现有“ C ++项目”中创建新的“头文件(.h)”?

[英]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.

相关问题 如何在 Visual Studio Community 2015 上打开输入文件、C++? - How to open input file, C++ on visual studio community 2015? 单击确定后,Visual Studio 2015社区c ++新项目窗口消失 - visual studio 2015 community c++ new project window disappears after clicking OK 无法在Visual Studio 2015社区RTM中创建/打开C ++项目 - Unable to create/open C++ project in Visual Studio 2015 Community RTM 如何使Visual Studio 2015 C ++项目与Visual Studio 2010兼容? - How do I make a Visual Studio 2015 C++ project compatible with Visual Studio 2010? 如何在Visual Studio C ++项目中找到iostream头文件? - How do I find the iostream header file in a Visual Studio C++ project? 如何在Visual Studio Community 2015中创建“ ATL项目”? - How to create an “ATL Project” in Visual Studio Community 2015? 为什么Visual Studio Community 2015中的C ++项目只包含通用应用程序? - How come C++ project in Visual Studio Community 2015 only contain Universal Apps? 将现有的.h和.c文件添加到Microsoft Visual Studio 2010 C ++项目中 - Adding existing .h and .c files to a Microsoft Visual Studio 2010 C++ project 如何在Visual Studio 2015中调试现有的C ++源代码? - How do I debug existing C++ source code in Visual Studio 2015? 如何在Visual Studio 2015中更新我的C ++项目以使用新的Universal CRT? - How to I update my C++ project in Visual Studio 2015 to use the new Universal CRT?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM