如何在VS 2008中将注释更改为/ * * /而不是//?
答案 0 :(得分:1)
// this is a line comment, it will only comment this line
// for the next line you need to repeat //
/* this is a block comment
you can do all sort of stuff here
and you won't have to worry about beginning the line with some special chars
until the end*/
由于这两种评论有点不同,我会说你应该同时使用这两种评论。在同一个文件中包含行和块注释并不是错误。
我想你可以运行一个正则表达式替换,它会替换//
行的开头/*
并在结尾添加*/
,但你最终会得到这样的结果
/* first line comment */
/* second line comment */
/* third line comment */
/* forth line comment */