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

And*_*uri 5 c++ mouse function visual-studio-2008

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

就像是

void myfunct(int a; char b, float c);

This function just messes with the variables with no objetive 
but to show people from stackoverflow what I mean.
Inputs-> a: does nothing
         b: neither this one
         c: nope
Run Code Online (Sandbox Code Playgroud)

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

Big*_*oss 5

如果您想到 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>
Run Code Online (Sandbox Code Playgroud)

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