"Reprint" Using VC + + 6.0 some tips

Source: Internet
Author: User
Tags function prototype

Some tips for using VC + + 6.0


-Always remember to save as often as you can when using any program (whether it's Word or VC + + 6.0 or playing a game). Trust me, one crash is enough to make you mad.
-Compile (Compile) (the first item of the Build menu) before writing the program (even when it is still an empty file), and choose Yes if you have a dialog box to ask.
So, write the program VC + + 6.0 will try to give you a hint about the code, such as write the function name after the opening parenthesis "("), VC + + 6.0 will tell you the function of the parameter table:
printf (<-this bracket just hit
int printf (const char *, ...) <-This is VC + + 6.0 tells you, because you are writing the first argument at this time, so "const char *" (meaning: Require a const char *) is bold
-Note that saving the file as. C and. CPP is not the same effect. Save As. C, you can't use bool type, but the compiler will follow the C syntax rather than C + + syntax, which will help ensure that your program is consistent with what you want.
-When you open a previous file, do not open the. C or. cpp file directly, instead of opening the. dsw file, you will find that the VC + + 6.0 interface is the last time you close the file interface, even the window position is the same.
-Do not click on the link button, click the Build menu all the rebuild (Rebuild all), otherwise VC + + 6.0 will sometimes panic.
-Have time to go to E:\Program Files\Microsoft Visual Studio\vc98\include\ to see (assuming that your VC + + 6.0 installed to E disk).
Do not be intimidated by the dense files inside, all are VC + + 6.0 of the library files. Should be able to see MATH.H, stdio.h, String.h and other famous "people" bar.
Open Stdio.h and see if you can find the function prototype printf. (Not really, edit-> find)
-the shortcut icon for VC + + 6.0 on the desktop is missing. Go to F:\Program Files\Microsoft Visual Studio\common\msdev98\bin\ (assuming your system is in F), put msdev.exe with the right mouse button to catch the desktop, and then "create a shortcut in the current location", Then change the new icon to a nice name.
-Do not write if (functionname (CH) ==1) and write if (Isupper (CH)) when using the character determination function in Ctype.h (Isupper (), Islower (), is***** (), and so on).
VC + + 6.0 provides these functions in fact, depending on the type of characters to return different values, such as uppercase return 1, the number returned 4 (see CType.txt) and so on, if you dare to write if (isdigit (CH) ==1) ... Hey, the code in {} will never be executed (isdigit (CH) returns 4 when CH is a number, otherwise it returns 0 and never returns 1).
-The criterion is 0 to 0 o'clock do not use if (expression==0) or if (expression!=0), write if (! expression)) or if (expression), lest you lose an equal sign to "=" written "=".
-A compile error occurred. Double-click the given error message to jump to the wrong row or to the next line.
Error to look from the top down, if a variable is not defined will cause 10 fishes error.
If you lose a semicolon, you will be prompted on the next line, with a semicolon at the end of the line.
function does not declare return value, you will be prompted to default to int, but usually you do not write back RetValue; Again, two mistakes. So--remember to write void without considering the value of the function (the only exception is the main function, whose return value is not for you to see).
-variable name, preferably with the corresponding English words. (Look up the dictionary.) )

In addition, it is common practice to prefix the variable name with the type and capitalize the first letter of each word.



Reprint URL: http://wenku.baidu.com/link?url=FyqJ6bxrGivbRjGjaYkSpP_J3czVGt2IttBZ9sdddXGpXkklb28T8QgTj5gz_lpFj_ 9ASDbszJoJgvnNkQTkYsOkHlLgJtfxSexjMcRscvC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.