
c 语言
陈纳
这个作者很懒,什么都没留下…
展开
-
变量指针总结,堆栈
#include "stdafx.h"#include "stdio.h" int *c1;const *b1; void fuzhi(){ static int a=3; // printf("%d\n",&a); const int b=5; printf("%d\n",&b); b1=&b;int c=6;原创 2015-06-09 09:56:40 · 409 阅读 · 0 评论 -
C如何使用固定地址来访问函数
#include "stdafx.h"#include "stdio.h"int add(int a,int b){ return a+b;}int main(int argc, char* argv[]){//直接地址int c=((int (*)(int,int))4198405)(1,2); printf("%d\n",c);原创 2015-06-09 10:01:54 · 2567 阅读 · 0 评论 -
c 封装类,模范类
#include "stdafx.h"#include "stdio.h"#include "string.h"struct peple{ char name[20]; int age; void chushi(char * _name,int _age) { strcpy(name,_name);原创 2015-06-09 15:05:04 · 482 阅读 · 0 评论 -
如何通过数组来保存函数指针
#include "stdio.h"typedef int (*ad)(int,int); int add(int a,int b) { return a+b; } int mul(int a,int b) { return a*b; } int sub(int a,int b) { return a-b; } int div原创 2015-07-04 09:19:42 · 1265 阅读 · 0 评论