【发布时间】:2013-04-05 03:43:19
【问题描述】:
几天前我开始使用 Visual Studio 2012 学习 C++。我习惯于使用 IntelliJ IDEA 进行 Java 编程,并且在调用方法时总是会显示文档和预期的参数。有没有办法在 C++ 的 VS2012 中也这样做?
如果我理解正确,由于 IntelliSense,这应该已经显示,但如果我例如调用向量或字符串的成员函数,它只会显示如下内容:
public: std::vector<std::string, std::allocator<std::string>>::const_iterator std::vector<std::string, std::allocator<std::string>>::begin() const
但没有任何东西表明返回什么,预期什么,这个函数做什么。我只是缺少文档文件吗?
非常感谢任何帮助!
【问题讨论】:
-
它告诉你返回了什么:
std::vector<std::string, std::allocator<std::string>>::const_iterator,但你是对的,如果能提供更多信息就好了。 -
感谢您提供的信息。这已经让它更清晰了:)
-
没问题。当您使用大量模板化方法时,智能感知可能会变得非常长且令人费解,但返回类型始终是访问级别之后的第一部分。有很多网站可以告诉您如何使用 STL。 cppreference.com 是我的最爱之一。祝你好运!
-
cmets 函数的作用如何?无论如何要得到那些?
-
+1 C# in Visual Studio 2012 确实有非常简洁的文档。我不明白为什么 C++ 中不包含此功能...
标签: c++ visual-studio-2012 documentation intellisense