[英]Why can't I automatically create definition files in Visual Studio?
I am making my first steps in C++ and after creating a class header file I want to automatically create a definition file by pressing Ctrl+., but Visual Studio tells me that it couldn't create one.我在 C++ 中迈出第一步,在创建类头文件后,我想通过按 Ctrl+. 自动创建一个定义文件,但 Visual Studio 告诉我它无法创建一个。 I always have to manually create one and then it works.
我总是必须手动创建一个然后它才能工作。 Also, when I put the headers and source files in separate folders, Visual Studio tells me that the file is write protected.
此外,当我将标头文件和源文件放在不同的文件夹中时,Visual Studio 会告诉我该文件已被写保护。 All files are located in my profile folder, so there should be no write protection.
所有文件都位于我的个人资料文件夹中,因此应该没有写保护。
Any ideas why this could be?任何想法为什么会这样?
I suggest you could refer to the Doc: Create Declaration / Definition我建议您可以参考文档: 创建声明/定义
When: You have a function that needs a declaration, or vice-versa.
何时:您有一个需要声明的 function,反之亦然。
As far as I'm concerned, first of all, you should have a function that needs a declaration.就我而言,首先,您应该有一个需要声明的 function。
Simply because Visual studio is just total garbage compared to Clion.仅仅是因为与 Clion 相比,Visual Studio 完全是垃圾。 Unfortunately I am forced to use it,so I have to spend atleast 2 hours to fix those things and write declarations manually and that process is quite slow since I'm new to C++.
不幸的是,我被迫使用它,所以我必须至少花费 2 个小时来修复这些问题并手动编写声明,而且这个过程非常缓慢,因为我是 C++ 的新手。 Wouldn't recommend it to my worst enemy.
不会推荐给我最大的敌人。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.