Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2012 how to show documentation of standard C++ libraries via IntelliSense?

I started learning C++ a few days ago using Visual Studio 2012. I'm used to programming Java with IntelliJ IDEA and there you always get shown the documentation and expected arguments when calling a method. Is there a way to also do this in VS2012 for C++?

If I understood it correctly this should already be displayed because of IntelliSense but if I for example call a member function of vectors or strings it only shows me something like:

public: std::vector<std::string, std::allocator<std::string>>::const_iterator std::vector<std::string, std::allocator<std::string>>::begin() const

but nothing indicates what is returned, what is expected, what this function does. Am I just missing the documentation files?

Any help is greatly appreciated!

like image 850
xxSwordy Avatar asked Jan 19 '26 08:01

xxSwordy


1 Answers

As far as I know, Vistual Studio doesn't have this function even in version 2019 (haven't try 2022, but I guess it doesn't either). I think there may be 2 reasons for this:

  • C++ is far more complicated than Java. There are so many historical problems. It was not designed with a document comment gramma at first.
  • The standard library is used too frequently that you are supposed to remember its API. There's not so much to rememver, right?

Some IDEs can show you hints when the comments are in Doxygen format. I know C++ plugins for VS Code and Qt Creator do. Maybe Visual Studio can do this too? But Vistual Studio's implementation of STL doesn't use Doxygen.

Also, don't expect to understand what the type name means if you use templates, because there will be some type names like this 🤣:

struct boost::fusion::vector<class boost::spirit::lex::lexertl::iterator<class boost::spirit::lex::lexertl::functor<struct boost::spirit::lex::lexertl::token<class std::_String_iterator<class std::_String_val<struct std::_Simple_types<char> > >,struct boost::mpl::vector<__int64,struct String,struct Symbol,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na>,struct boost::mpl::bool_<1>,unsigned __int64>,class boost::spirit::lex::lexertl::detail::data,class std::_String_iterator<class std::_String_val<struct std::_Simple_types<char> > >,struct boost::mpl::bool_<1>,struct boost::mpl::bool_<1> > > & __ptr64,class boost::spirit::lex::lexertl::iterator<class boost::spirit::lex::lexertl::functor<struct boost::spirit::lex::lexertl::token<class std::_String_iterator<class std::_String_val<struct std::_Simple_types<char> > >,struct boost::mpl::vector<__int64,struct String,struct Symbol,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na>,struct boost::mpl::bool_<1>,unsigned __int64>,class boost::spirit::lex::lexertl::detail::data,class std::_String_iterator<class std::_String_val<struct std::_Simple_types<char> > >,struct boost::mpl::bool_<1>,struct boost::mpl::bool_<1> > > const & __ptr64,class boost::spirit::lex::lexertl::iterator<class boost::spirit::lex::lexertl::functor<struct boost::spirit::lex::lexertl::token<class std::_String_iterator<class std::_String_val<struct std::_Simple_types<char> > >,struct boost::mpl::vector<__int64,struct String,struct Symbol,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na,struct boost::mpl::na>,struct boost::mpl::bool_<1>,unsigned __int64>,class boost::spirit::lex::lexertl::detail::data,class std::_String_iterator<class std::_String_val<struct std::_Simple_types<char> > >,struct boost::mpl::bool_<1>,struct boost::mpl::bool_<1> > > const & __ptr64,struct boost::spirit::info const & __ptr64>
like image 138
yhgu2000 Avatar answered Jan 21 '26 22:01

yhgu2000



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!