In summary, there are three types of annotations:
1. Single-line Comment
1: //haha single-line comment
2. Multi-line annotations
1: /*
2: asdfasdfasdfasdfasdf
3: * /
Where multiple lines of comments are written
1: /*
2: * function is ...
3: * /
4: void dosomething () {...}
The compiler can automatically recognize when the mouse clicks on the function name thing. The right side of the system can display the corresponding comment:
1: #include <stdio.h>
2: //This is a main function,//is the entry of the whole program 4353454//355345435
3: int main ()
4: {
5: / * This function can output "111" to the screen 5435435345
6: printf ("111\n"); 534543543543*/
7: printf ("333\n");
8: printf ("444\n");
9: printf ("555\n");
Ten: return 0;
One : }
:
£ /*rewrewrwe*/
1: the first type:
2: I am code 1
3: //I am a note 1
4: I am code 2
5:
6: the second type:
7: I am code 1
8: /* I am comment 1
9: I am comment 2
Ten: I'm a note 3
One : * *
I am the code 2
:
: the third type:
1 : I'm the code.
: #if 0
+ : I'm a note 1
S : I'm a note 2
3 : I'm a note.
: #endif
M : I am code 2
:
1: Combination
: #if 0
* / *
A : I'm a note .
: * /
: #endif
£ º
2: Combo:
/ *
+ : //I am a comment
: * /
:
: Error 1
/ *
Notoginseng: /*
A : the compiler is dizzy.
: * /
Max : */
:
2 : Error
: //*
A : Compiler: Help
* /
Black Horse programmer--"Dark Horse video note" C Language basic notes and common mistakes