Click to See Complete Forum and Search --> : Ms C++ 6
badgers
Nov 19th, 2002, 03:14 PM
as a VB programmer is there a way to get C++ to not be case sensitive regarding variable names?
also is there a way for it to give me an intellisence type combobox to see what the different methods and properties of a certain class are?
thank you for your time and have a good day
Zaei
Nov 19th, 2002, 03:23 PM
I seem to remember something about disabling case sensitivity, but I think it was for a borland compiler. In any case, its not a good practice.
Second, MSVC6 already does. You have to have created a project for it to work, though.
Z.
badgers
Nov 19th, 2002, 03:34 PM
could you elaborate on the project thing.
I believe I have a project.
I find cases where I use the syntax
rbTrav=rbTrav->rbnext;
when I do the -> I don't get a list of choices.
thank you for your time and have a good day
PS
when is it good practice to have a variable named Mystr and mystr?
it seems that it would be difficult to read or debug. I always like declaring VB variables with some upper case and typing them lower case.
If I make a typo in lower case I know right away because the computer does not change it to upper case. It was always a quick check for me when typing. Now I wait until I compile or build and then I get some undeclared identifier.
The Hobo
Nov 19th, 2002, 04:22 PM
The best way to get around case sensitivity in C++ is to have all your variables in lowercase and all your constants in uppercase.
Well, that doesn't even matter. Just get into the habit of doing it some way. :)
I do what I said above, but I also usually have all my function names in title case (or proper case, or whatever every-first-letter-uppercased is called)
Zaei
Nov 19th, 2002, 09:18 PM
In the end, intellisense isnt all that reliable (in most of the classes in most of my projects, the intellisense pops up, but it shows me parameters that have long since changed. Use the class browser (the other side of the file browser) for a more reliable way to get function parameters (or start remembering them).
Z.
CornedBee
Nov 20th, 2002, 04:51 AM
Intellisense sometimes works and sometimes not. The one in VC++7 is generally far more reliable.
Case sensitivity: it's not good practice to have one variable named Mystr and one mystr, but you might get into the situation where you have a constant named MAX_OBJECTS and then you have a variable in a function called max_objects. It might happen.
And it's basically bad style to type names differently from what they are (i.e. type them all lowercase even though they're mixed case). It will at one point come down on you.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.