The article directories

    • 1. Comment (comment)
    • 2. Comment type in C
    • 3. Use details

1. Comment (comment)

  1. The text used to annotate an interpreter is called comments, and comments make code easier to read.
  2. Comments are a good programming habit a programmer must have. Put your ideas through comments first, and then use code to reflect them.

2. Comment type in C

  1. One-line comment:

    Format:// Comment the text
  2. Multi-line comments (block comments)

    Format:/* Comment the text */

3. Use details

  1. For single line and block comments, the annotated text is not executed.
  2. Block comments are not allowed to be nested within block comments
  3. Shortcuts can be configured to suit your preferences
  4. Icon for configuring shortcut keys
  • VC++ 2010, tools – > options – > environment – > keyboard, find comment shortcuts
  • I set it up hereThe comment key:Ctrl+/Uncomment key:Ctrl+\

  • Configure VC++ 2010 to display line number: tools – > options – > general