Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ visual studio继续多行注释_C++_Visual Studio_Comments - Fatal编程技术网

C++ visual studio继续多行注释

C++ visual studio继续多行注释,c++,visual-studio,comments,C++,Visual Studio,Comments,VisualStudio2005。使用C++时,有没有办法在我按Enter时自动继续评论?例如,我键入“/”,然后开始输入冗长的评论。当我按Enter键时,我希望它在当前缩进级别自动放置一个“//”序列(如果使用C样式注释,则放置一个“*”。我还没有在谷歌上搜索到解决方案(尽管似乎很多人希望删除C风格的注释延续)。我在VS2013中彻底搜索了编辑器首选项,目前没有选项自动继续注释 但是,对于三斜杠(//)注释,您有两个选项: 在下列情况下,按Enter键后,三斜杠注释行将自动继续: 光标处的注释

VisualStudio2005。使用C++时,有没有办法在我按Enter时自动继续评论?例如,我键入“/”,然后开始输入冗长的评论。当我按Enter键时,我希望它在当前缩进级别自动放置一个“//”序列(如果使用C样式注释,则放置一个“*”。我还没有在谷歌上搜索到解决方案(尽管似乎很多人希望删除C风格的注释延续)。

我在VS2013中彻底搜索了编辑器首选项,目前没有选项自动继续注释

但是,对于三斜杠(
//
)注释,您有两个选项:

在下列情况下,按Enter键后,三斜杠注释行将自动继续:

  • 光标处的注释行包含任何非空白字符。我喜欢这种情况,因为我可以按正常方式继续键入,然后双击
    Enter
    终止注释。结果是这样的:

    /// This is my multiline comment.
    
    输入
    并键入更多注释:

    /// This is my multiline comment.
    /// I just pressed enter.  Now I'll press enter twice and start coding.
    
    按两次“输入”,然后键入代码:

    /// This is my multiline comment.
    /// I just pressed enter.  Now I'll press enter twice and start coding.
    /// 
    public class ...
    
  • 光标下方的注释行包含另一条三斜杠注释。这允许您对多个段落和使用示例进行大注释,并用空行分隔。这是:

    /// There is already a comment line below. CURSOR IS HERE -> |
    ///
    
    Enter
    三次,然后开始使用示例:

    /// There is already a comment line below. CURSOR IS HERE -> |
    ///
    ///
    /// For Example:
    /// 
    /// Foo foo = bar;
    ///
    
    空注释行保留,您可以继续任意注释


  • 在按enter键之前尝试放置\项。是的,这是一个骗局,但它得到了工作doneUse/*和*/来界定你的评论,或者#如果0#我知道我可以使用C风格的注释,我喜欢自动注释功能。“作弊”不起作用。那么,我想知道,我所寻找的是不存在的?嗯,在C++项目中,Visual Studio 2017中没有为我工作,我是否有一个选项?