[英]Visual Studio 2019 - don't insert a linebreak when opening curly braces (C++)
I want to declare a variable like this:我想声明一个这样的变量:
int foo {5};
But as soon as I open the first curly brace, VS does this instead但是一旦我打开第一个花括号,VS 就会这样做
int foo {
}
I've spent a long time trying to find the relevant option but haven't had any luck.我花了很长时间试图找到相关选项,但没有任何运气。
Thanks.谢谢。
单击上方工具栏中的“选项”,在出现的窗口中转到左侧菜单中的“文本编辑器”,选择“C++”、“格式”并命令 Visual Studio 从不换行此类语句。
I couldn't reproduce the issue at vs2019.我无法在 vs2019 上重现该问题。 I suggest you could try to
reset settings
.我建议您可以尝试
reset settings
。
Tools->Import and Export Settings...->Reset all Settings->Next->"No, just reset settings, overwriting my current settings"->Next->General->Finish工具->导入和导出设置...->重置所有设置->下一步->“不,只需重置设置,覆盖我当前的设置”->下一步->常规->完成
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.