1、指针申请内存,malloc 注意使用free 或者delete 释放变量。
2、类中注意写上析构函数。
3、
extern int a; //变量声明而没有定义 使用extern
extern int i(int); //函数的声明而没有定义 可选extern
int b; //变量声明又定义了
int i(int x) //函数的定义
{
return x+1;
}
void main(void)
{
a = 1;
int c=i(a);
printf("%d\n",c);
}