Introduction to Visual C ++ source code specifications

Source: Internet
Author: User

If you are a Visual C ++ programmer and have a headache with Visual C ++ source code, you may not be so worried, after reading this article, you will learn about the techniques related to Visual C ++ source code.

If you use other tools to organize the source file code, you need to re-code the source file outside of VC. The results cannot be viewed and compiled directly in VC. Can I integrate a tool in VC to easily click the VC button to sort out the source code?

Next I will introduce an open Visual C ++ source code organizing tool named astyle and how to integrate the configuration in the VC development environment. You can quickly implement the Code sorting function in VC, hoping to help you.

1. Visit http://sourceforge.net/projects/astyle, download the astylepackage, package the source file, executable file, and usage instructions.

2. Copy beiastyle.exe to c: \ winnt \ system32.

  • Mechanism Analysis of C ++
  • Instructions on C/C ++ header files
  • Is the C ++ language really so hard to learn?
  • How to compile C ++ Code better and faster
  • Analysis on the implementation method of C ++ Interface

3. Configure VC and add the astyle code sorting function.

1) create a menu item "format sorting" in VC ". Right-click on the toolbar to open the Customize window. On the Tools tab, create a menu item: "", and enter the corresponding path of the plug-in tool program in Command: "C: \ winnt \ system32 \ astyle.exe ".

2) In Arguments, enter the plug-in tool program Configuration Parameter -- style = ansi $ {FileName }$ {FileExt }. -- Style = ansi indicates that the ANSI style format and indentation are used. Of course, you can also choose other styles. The optional styles and samples are as follows:

For more detailed configuration parameters of Visual C ++ source code, see the astyle random document. $ {FileName }$ {FileExt}: indicates the source file being edited. In Initial directory, enter the $ (FileDir) parameter to indicate the Initial running path. After this parameter is set, the initial path of astyle startup is the current file path.

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.