
c语言
电猿
这个作者很懒,什么都没留下…
展开
-
c 中typedef函数的用法
#include typedef int(*FP_CALC)(int,int); //注意这里不是函数声明而是函数定义,它是一个地址,你可以直接输出add看看 intadd(int a,int b) { return a + b; } intsub(int a,int b) { return a - b; } intmul(in转载 2014-03-22 16:04:46 · 746 阅读 · 0 评论 -
c++中修饰思想的分析
用c++实现的代码,原创 2014-09-28 09:26:02 · 497 阅读 · 0 评论 -
malloc的内存分配之 malloc(0)的内存分配情况
#include using namespace std; int main() { char *p; if((p=(char *)malloc(0))==NULL) puts("got a null pointer"); else puts("got a valid pointer"转载 2014-10-07 09:57:37 · 743 阅读 · 0 评论 -
c语言结构体
#include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ typedef struct{int num;} mynum; #define num_val(x) ((x).num) int m原创 2014-10-12 21:18:53 · 437 阅读 · 0 评论 -
shell与c交互
shell与c交互原创 2017-06-16 10:05:03 · 757 阅读 · 0 评论 -
c++中字符串find后,正确的判断方式
string::npos原创 2017-09-19 10:16:53 · 805 阅读 · 0 评论