
本文共 5930 字,大约阅读时间需要 19 分钟。
C���������������������������
������������������������������
������������������������������������������������������������������������������������������������������review������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������������������������review���������������������������������������������review������������������������������������������������������������
������������������������������������
1. ���������������������
������������������������������������������������������������������������������������������������������������
- ������������
- ���������������������������������
- ������������������������/������������������������
- ������������������
���������������������������
/* Copyright (c) 2001, company. All rights reserved. * ���������������filename.h * ��������������������������������������� * ��������������������������������� * ���������������1.1 * ���������������(������������)������ * ���������������2021���4���5��� * ���������������1.0 * ������������������(������������)������ * ���������������2021���4���1��� */
2. ������������������
���������������������������������������
���������������������
- ������������������������������������������������
ifndef/define/endif
������������������������ - ������������������������������
<filename.h>
������������������������������"filename.h"
- ���������������������������������������������������������
- ���������������������������������������������������������������������
3. ������������������
���������������������������
4. ������������������
������������������������
- ���������������������������������������������������������������������
- ������������������������������������������������������������������������������
���������������������������
��������� | ������������ | ������������ |
---|---|---|
source | ��������� | .c������ |
include | ��������� | .h������ |
lib | ��������� | ��������� |
build | ������������ | |
debug | ������������ |
5. ������������
������������������������������
- ������������������������������������������������������
- ���������������������������������
- ���������������������������min-length & max-information���������
- ���������������������������������������������
- ���������������������������������������������������
���������������������
- ���������������������������������������+���������
- ���������������������������������������������������������������������������
������������������������������
6. ���������������
������
������������������������������������������������������������������������������������������
���������������
- ������������������������������������������
- ������������������������������������������������
- ������������������������������������������������������������������������������������
���������
- ������������������������������
- if���for���while������������������������������������������������������������
if (������) { // ������������������������������������������������������}
- ������������������������������������
������������������������������������������������������������������������������������������������
������������������������������
- ���������������������������������������
a + b
- ������������������������������������
sizeof(a)
���a[0]
[]
���.
���>
���������������������������
������������
{
���}
���������������������������������������������������������- ������������������������
{
������������������������
������������
- ������������������������������70-80���������������
- ���������������������������������������������������������������������������������
- ������������������������������������������
������������������
- underscore���ampersand������������������������
int *x, y;
- ���������������������������������
7. ������
������������
-
���������������
// ...
-
���������������
/.../
���/*...*/
-
���������������������
- ���������������������
- ������������������
- ������������������������������
- ������������
���������������
- ���������������������������������������������
- ���������������������������������������������
- ���������������������������������������������������������������
- ������������������������������������������������������������
- ������������������������������������
������������������������������������
1. ������������������
������
������������������������������������������������������������������Debug���������������assert
������������������������������������������������������������������
- ������������������
- ������������������
- ������������������
- ���������������������������
- ���������������������������������
������������������������������
#include#include #include void out(FILE *spIn) { assert(spIn != NULL);}int main(void) { FILE *spIn; spIn = fopen("src/a.txt", "r"); assert(spIn != NULL); spIn = NULL; out(spIn); return 0;}
���������������
������������������������������������������������������������������������������������������������
-
������������������������������������������
-
���������������������������������������������
-
���������
a = b = c = 0; // ������
-
������������������������������������������������������������������������������
if������
- ���������������������������������
TRUE
���FALSE
���0
������������������������!
("not")������������ - ������
==
���!=
���������������������0 - ������
>=
���<=
������������������������������
const������
������const
������������������������
- ������������������
- ������������������������������������������
- ������������������
const
������������������������������������������
������������
malloc
���������������������������������- ���������������������������������������
- ������������������������������������
���������������
void get_mem(char **p, int num) { p = (char **)malloc(sizeof(char) * num);}test:
发表评论
最新留言
关于作者
