Re: [Dev-C++] declaring a integer vairable
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2005-02-18 14:52:47
|
First of all - never add a prefix "var" or similar that doesn't mean anytning. Second - a variable name may contain digits, but it may not start with a digit, so "1" is not a valid variable name. When declaring variables, always make sure that their names describes the variable function in a good way, i.e. int number_of_customers; int remaining_attempts; int kilobytes_transmitted; int customer_idx; ... Then you can read your source code two years from now, and understand what it does. A variable named "test" doesn't give much information about it's use. You might possibly be testing something, but testing what? /Per W On Fri, 18 Feb 2005, Gerald Humphreys wrote: > Hi all > > I have been on a couple of c++ websites. Some of them say to declair an > interger vairable you will you this code. > > int var1; > int vartest; > > And some of them say this > > int 1; > int test; > > Which one is correct do you have to use that var. > > Regards > Gerald > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |