Thread: Visual C++ intellisense

  1. #1
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303

    Visual C++ intellisense

    I've noticed that in VC++ the intellisense doesn't fire up for instances of classes or structs defined locally inside a function. Is there some reasoning behind this or is it just a shortcoming of VC++?

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Probably a shortcoming, that is my guess. The default IntelliSense can be rather poor.
    If you have to burn (and I mean a lot >_<), then I would suggest Visual Assist X.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Sharke View Post
    I've noticed that in VC++ the intellisense doesn't fire up for instances of classes or structs defined locally inside a function. Is there some reasoning behind this or is it just a shortcoming of VC++?
    I wonder about the appropriateness of defining function-local data types. Why are you doing this?
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    And if a struct is defined locally in a function, do you really need the IDE to tell you the names of members?

  5. #5
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Steady on guys, I'm just exploring the language!

    Actually I noticed this in the course of going through one of the many exercises at the end of each chapter of Bruce Eckel's "Thinking in C++." He has you doing all sorts of things...define this class here, define this struct there, create an instance of this class in this function....see what the compiler tells you....define this globally instead and see what the compiler tells you now....

    Etc.

    And in the process I noticed that Intellisense doesn't work when you define a type in a function and since I'm a beginner with a naturally curious outlook, I wondered whether there was some reasoning behind this or whether it was just a bug. As it happens I've since come across a bug report for this very issue on the Microsoft site. It was reported in 2006 and the response was that they don't have the time or resources to fix it.

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by Sharke View Post
    Steady on guys, I'm just exploring the language!
    You're not having a problem with the language, but with an IDE. Intellisense has nothing to do with the C++ language.

  7. #7
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Quote Originally Posted by medievalelks View Post
    You're not having a problem with the language, but with an IDE. Intellisense has nothing to do with the C++ language.
    Not very perceptive are you? When I pointed out that I was exploring the language it was in response to the replies which questioned why I was defining a type to be local to a function.

  8. #8
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by Sharke View Post
    Not very perceptive are you? When I pointed out that I was exploring the language it was in response to the replies which questioned why I was defining a type to be local to a function.
    My question was about why you needed Intellisense for this. You probably missed it, though, in your rush to point out my lack of perception.

  9. #9
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Quote Originally Posted by medievalelks View Post
    My question was about why you needed Intellisense for this. You probably missed it, though, in your rush to point out my lack of perception.
    There it goes again! I said nothing to even insinuate that I was using Intellisense to explore the language. I made it very clear that I was curious about something I had discovered about Intellisense in the course of exploring the language.

    Cripes, I'd hate to have to debug one of YOUR programs

  10. #10
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by medievalelks View Post
    My question was about why you needed Intellisense for this. You probably missed it, though, in your rush to point out my lack of perception.
    Faster typing out members, among other things?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  11. #11
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Okay guys... I think we've reached a conclusion here. Intellisense has trouble with function-local data types.

    I was curious why you were doing this, because it's pretty unorthodox. "Exploring the language" is as good a reason as any.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  12. #12
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by Elysia View Post
    Faster typing out members, among other things?
    If you already know what member you want, Intellisense gets in the way.
    Last edited by medievalelks; 05-18-2009 at 11:07 AM.

  13. #13
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    It takes literally no time to fire up. It comes up automatically and blazingly fast.
    And no, to some, IntelliSense does not get in the way.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    Registered User Sharke's Avatar
    Join Date
    Jun 2008
    Location
    NYC
    Posts
    303
    Quote Originally Posted by Elysia View Post
    It takes literally no time to fire up. It comes up automatically and blazingly fast.
    And no, to some, IntelliSense does not get in the way.
    Every now and then it'll annoy me by hiding something I want to glance at while I'm typing. For instance, a line of code below the one I'm working on. But the pros outweigh the cons. It's actually a great learning tool for a beginner because, for instance, it indicates when you've passed an argument correctly into a function. However every now and then I find it doesn't work first time for some reason....then I'll go back and delete the object name and type it again and it does work.

  15. #15
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    If it does hide something, I just hit Esc to dismiss it,
    And if I find it doesn't want to show something, then usually I compile the code and get rid of any compile errors IntelliSense might be hung up upon. Then it usually works.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM