在Visual Studio 08中悬停鼠标时显示功能信息



我只是想知道哪一种是我必须在函数中编写注释的格式,以便在将鼠标悬停在函数上时显示它们。

类似的东西

void myfunct(int a; char b, float c);
This function just messes with the variables with no objective 
but to show people from stack overflow what I mean.
Inputs-> a: does nothing
         b: neither this one
         c: nope

因此,当我在一个大项目中使用这些函数时,我不需要去寻找那个特定的函数是什么,或者那个变量的含义是什么。

如果你想到像C#或VB这样显示参数和函数描述的东西,那么MSVC中没有这样的东西,但是Microsoft有一个特殊的代码注释格式,如下所示,可用于生成帮助:

/// <summary>
/// summary of variable, function, class or any thing else
/// </summary>
/// <remarks>
/// detailed description of object
/// </remarks>
/// <param name="a">description of a</param>
/// <param name="b">description of b</param>
/// <param name="c">description of c</param>
/// <returns>describe return value of function</returns>

编译代码时,它将生成可用于生成帮助文档的 XML 文档。

最新更新