参数的参数必须在函数头中定义,是调用函数时必须制定的变元占位符.
几个典型的函数头
bool sendMessage(char *text)
void printData(int count, double *data)
char message getMsg(void)
常见返回类型
int int 2~4bytes
short int 2bytes
long int 4bytes
long long int 8bytes
char string 1byte
float float 4bytes
double float 8bytes
long double 12bytes
void null
int* 指向INT指针
short* 指向short指针
long* 指向long指针
这些都是指针没什么说的
long long*
char*
float*
double*
long double*
void*
c比PHP严格很多,如果返回类型定义为void,却返回了一个值,那么编译器会毫不客气的返回fate err
如果定义要返回值,却没有return也会杯具
上一篇:PHP选择地区 下一篇:快递查询API