gpt4 book ai didi

visual-studio - Visual Studio 2017 中的注释样式

转载 作者:行者123 更新时间:2023-12-04 03:43:49 25 4
gpt4 key购买 nike

我想在 Visual Studio 2017 中选择一段代码并对其进行注释。我知道我可以使用 CTRL + K、C,但结果是:

    /*fstream in("c:\\users\\hp\\documents\\visual studio 2017\\projects\\inputfile.in");
if (!in)
{
cerr << "can't open input file\n";
return 1;
}
fstream out("outputfile.out", fstream::out);
if (!out)
{
cerr << "can't open output file\n";
return 1;
}*/

我真正想要的是

    //fstream in("c:\\users\\hp\\documents\\visual studio 2017\\projects\\inputfile.in");
//if (!in)
//{
// cerr << "can't open input file\n";
// return 1;
//}
//fstream out("outputfile.out", fstream::out);
//if (!out)
//{
// cerr << "can't open output file\n";
// return 1;
//}

我该怎么做?
我在网上搜索过,但没有找到这个问题的答案。

最佳答案

我自己找到了答案,但我只能用截图来解释它。
所以如果我想使用/.../风格,我选择这样的代码:
enter image description here

如果我想使用//样式,我选择这样的代码:
enter image description here

关于visual-studio - Visual Studio 2017 中的注释样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44550156/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com