【问题标题】:Visual Studio c++: how to generate function calls with its parametersVisual Studio c++:如何使用其参数生成函数调用
【发布时间】:2020-10-29 14:48:48
【问题描述】:

我注意到 Visual Studio IDE 中的 [Cltr + space] 等自动完成选项只能粘贴函数名称。 这是一个 c++ 示例代码:

class  TestClass
    {
    public: 
        explicit TestClass();
        virtual ~TestClass();
        void callThisMethod(int a, char ch, string s);        
    }

// TestClass.cpp file
void TestClass:callThisMethod(int a, char ch, string s){.....}

// main.cpp file:
TestClass tc;
tc.callThisMethod(int a, char ch, string s); // here

那么有什么方法可以让函数调用带有所有必要的参数。

【问题讨论】:

    标签: c++ visual-studio visual-studio-2010


    【解决方案1】:

    Visual Studio 为它的功能正确设计:

    智能感知将通过不断显示函数签名使您走上正确的轨道,以便您知道实际需要哪些参数。例如:

    从示例中可以清楚地看出,只要您键入并提供参数,弹出窗口就会帮助您遍历函数签名。

    因此,您所询问的功能目前似乎不可用,由于智能感知在这种情况下实际上对您有很大帮助,因此也不需要它。

    【讨论】:

    • 接受这个答案@OP。再好不过了
    猜你喜欢
    • 2019-10-03
    • 1970-01-01
    • 1970-01-01
    • 2017-08-05
    • 1970-01-01
    • 1970-01-01
    • 2019-11-30
    • 1970-01-01
    • 2023-03-11
    相关资源
    最近更新 更多