简体   繁体   中英

IntelliSense in Visual Studio C++

I've always loved IntelliSense in C# in Visual Studio 2013. I'm not only talking about autocomplete function but also about those methods' descriptions (documentation's excerpts I suppose) viewed in autocomplete box. For example when I write:

List<int> l = new List<int>();
l.Add

Then I get a nice explanation:

Adds an object to the end of the System.Collections.Generic.List.

Also hints when calling some method are very useful (how many overloads, types of parameters).

But lately I decided to write some C++ code in Visual Studio 2013 and I see that those methods' descriptions are not visible. For example when I write:

string s;
s.length

all I get is autocomplete + function definition (return type and types of parameters). No information about what does this function do whatsoever. It's not something I can't live with. I know what .length() does :-) but collections in STL have many functions and it would be very very nice to have their descriptions (I know they can't replace whole documentation, but some comment on applications would be very nice) in Visual Studio, not only on www.cplusplus.com/reference/

So my question is this: is it possible in Microsoft Visual Studio to make IntelliSense work with C++ exactly as it works with C#?

Unfortunately, I have never seen any code hinting tool which works with C++ with as much detail as IntelliSense works with C#. There certainly are tools which can provide you with basic code hinting for std:: elements, but nowhere as detailed. Ive used codelite 2.0 in the past and its ok, but thats an entire IDE and provides basic code completion, probably the same as using VS2013

You could add extensive comments to the std header files MSVC ships with.

In my experience comments directly beside a method show up.

This would be a big project, and ideally you'd want to fold it back to MSVC sources and then to their sources so it would persist between versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM