- 博客(7)
- 收藏
- 关注
原创 指针函数 和 函数指针 指针为参数时使用堆内存
/*-----函数指针 + 出参-----*/ #include #include #include char *GetString(char **p) { *p = (char *)malloc(11); strcpy(*p,"hello world"); return *p; } int main() { char *pStr = NULL;
2015-05-21 09:38:54
346
原创 进程间通信 SOCKET Client
#include #include #include #include #include #include #include #include #include #include #include #include #include int readnet( int sockid, register char *ptr, short nbytes) { int
2015-05-21 09:33:21
372
原创 进程间通信 SOCKET Server
#include #include #include #include #include #include #include #include #include #include #include #include int server() { int iSockfd = socket(PF_INET,SOCK_STREAM,0); /*1. 准备socket*/
2015-05-21 09:30:00
288
原创 windows 缓冲区溢出 简单例子
#include //#define sz1 "hello" int main(int argc, char *argv[]) { //char sz1[8] = "hello"; //const char *sz1 = "hello"; char sz1[8]; char sz2[8]; memset(sz1,0x00,sizeof(sz1));
2015-05-19 17:38:28
1142
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人