简体   繁体   English

源文件 header 文件和其他文件在 Visual Studio 2019 中创建空 C++ 项目时不显示

[英]Source file header file and other files are not displayed when I create empty C++ Project in visual studio 2019

I am very new to visual studio and I watched a couple of tutorials to understand how to use it, But I ran into a problem.我对视觉工作室很陌生,我看了几个教程来了解如何使用它,但是我遇到了一个问题。 Every person I watched on YT has a source file, header file, and other files when creating an empty Project but this isn't a case for me and I basically can't write anything.我在 YT 上看到的每个人都有一个源文件,header 文件,以及创建空项目时的其他文件,但这对我来说不是这种情况,我基本上什么也写不出来。 when I try to add a CPP file it doesn't even show an option to add it, it only shows class and resource when I right click and press on add.当我尝试添加一个 CPP 文件时,它甚至没有显示添加它的选项,当我右键单击并按下添加时,它只显示 class 和资源。 Basically, I want the files to show so I can create my main program and play around with it.基本上,我希望显示这些文件,以便我可以创建我的主程序并使用它。 在此处输入图像描述

Help is much appreciated.非常感谢您的帮助。

  • First Create an empty project .首先创建一个empty project
  • Second Go to solution explorer.第二个Go 到解决方案资源管理器。
  • Third Right click the source file option.第三右键单击source file选项。
  • Fourth Go to add and create a new item第四次Go add和创建新项目
  • Fifth Select .cpp file and press add.第五个 Select .cpp file并按添加。

And Congrats your.cpp file is created.恭喜您的.cpp 文件已创建。 Do the same procedure to create header file and class.执行相同的过程来创建 header 文件和 class。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 C++ 在 Visual Studio 2019 中创建一个新的头文件? - Create a new header file in Visual Studio 2019 with C++? visual studio 2019 - C++ 无法打开源文件 - visual studio 2019 - C++ cannot open source file 如何在 Visual Studio 项目中“单独”运行 C++ 文件而不受其他文件的影响? - How do I run a C++ file “by itself” in a Visual Studio project without the influence of other files? 如何在运行时仅重建我的 C++ 项目中的一个文件来修复 Visual Studio 2019 - How to fix Visual Studio 2019 from only rebuilding one file in my C++ project when run 如何在“ 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”? 在 visual studio 的 1 个项目中编译单个 c++ 源文件 - compile single c++ source file in 1 project in visual studio 在 Visual Studio 2019 中将自定义脚本文件与 C++ 项目一起使用 - Using custom script files with C++ project in Visual Studio 2019 如何在 Visual Studio 2019 中有条件地编译 c++ 源文件? - How do I conditionally compile c++ source files in Visual Studio 2019? 如何在Visual Studio C ++项目中找到iostream头文件? - How do I find the iostream header file in a Visual Studio C++ project? I built an OpenCV project in C++ visual studio 2019 using static library, but still needs dll file at the run time - I built an OpenCV project in C++ visual studio 2019 using static library, but still needs dll file at the run time
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM