Comments problem with MSVC 2003

This is a discussion on Comments problem with MSVC 2003 within the Tech Board forums, part of the Community Boards category; I'm having problems with seeing comments properly in my code. I don't know how to explain it but the IntelliSense ...

  1. #1
    Registered User mikahell's Avatar
    Join Date
    Jun 2006
    Posts
    114

    Comments problem with MSVC 2003

    I'm having problems with seeing comments properly in my code. I don't know how to explain it but the IntelliSense comments are never working right... Let's say I have this following code that I use under main():
    Code:
    struct foo {
    	UCHAR	a,	//A comment
    		b,	//B comment
    		c;	//C comment
    };
    
    int main() {
    	foo OBJ;
    }
    Now if I'd write "OBJ." on another line, a listbox would open telling the members for the OBJ's struct. And placing the cursor on any member is supposed to print out the comment that matchs with the data member. But it's not working at all... I only get the comment for "a" member no matter what I point on. I have also attached a .bmp explaining my problem.

    Can this be solved? Writing it this way works though, but I dislike writing out unsigned chars many times, and it can be really ugly if you have tons of vars... Any idea? Should I move on with MSVC 2005?
    Code:
    struct foo {
    	UCHAR	a;	//A comment
    	UCHAR	b;	//B comment
    	UCHAR	c;	//C comment
    };
    Attached Images Attached Images  

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,575
    The problem is that it seems MSVC2003 parser expects a semicolon, it seems. It makes sense if you ask me. If there is no way for you to configure the intelisense to expect a newline character, then you will have to live with option 2.

    Btw, the 2nd option is not ugly. It is advised by many. Your code becomes clearer and it makes it easy for you to edit it in case you need to change a type, remove a variable or search for its declaration.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User mikahell's Avatar
    Join Date
    Jun 2006
    Posts
    114
    Then it seems I'll have to live with the second option. Its just that I find it really repetitive to rewrite the data type each time...

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    Tip :: Ctrl + C and Ctrl + V

  5. #5
    Registered User mikahell's Avatar
    Join Date
    Jun 2006
    Posts
    114
    I know indeed ...

  6. #6
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    498
    Quote Originally Posted by Ken Fitlike
    This question is not about the c++ programming language but compiler configuration; moved to tech.
    You know, you've been doing A LOT of thread moving lately...Why don't people read a little bit more?
    get files in a folder and more
    How to get names of folders in specific folder
    http://cboard.cprogramming.com/showp...88&postcount=2

  7. #7
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    And watching ... which I still don't get, but at least he's an active mod!!!

  8. #8
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    Quote Originally Posted by Ken Fitlike
    'Twas but a wee jest - but a forthright one nontheless.
    I think you misinterpreted my use of that word or I used it in a position where it could be interpreted many ways.

    >> Originally Posted by Twomers
    it's twomers, with a small t
    Last edited by twomers; 09-04-2006 at 07:10 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code completion troubles with MSVC 2003
    By Bajanine in forum Windows Programming
    Replies: 9
    Last Post: 08-21-2008, 07:43 PM
  2. MSVC 2003 Debugging delete
    By Bajanine in forum Windows Programming
    Replies: 2
    Last Post: 09-09-2007, 01:15 PM
  3. Visual C++ 2003 header problem
    By j0seph in forum C++ Programming
    Replies: 3
    Last Post: 07-03-2005, 11:32 AM
  4. Replies: 0
    Last Post: 08-21-2003, 11:40 AM
  5. MSVC Tutorial problem - Monochrome Palette
    By colinH in forum C++ Programming
    Replies: 4
    Last Post: 10-30-2002, 03:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21