C/C++
文章平均质量分 79
w464693894w
这个作者很懒,什么都没留下…
展开
-
c++练习,c++类
c++基础知识类简单认识 #include #include using namespace std; class Student { public: string getName(){ return name; }; void setName(string name){ this->name = name; }; private: string na原创 2014-01-21 15:39:20 · 600 阅读 · 0 评论 -
c语言gmail基于openssl的简易程序
本程序基于imap邮件协议 环境比较奇葩,eclipse+window 7+cygwin+openssl+gcc eclipse主要用于编写代码,gcc用来编译 $ gcc -g -L"C:\cygwin64\lib" -o main main.c -lssl -lcrypto /** * 对返回值未做分析,存在很多不足 * gcc -g -L"C:\cygwin64\lib" -o ma原创 2014-01-17 21:47:27 · 805 阅读 · 0 评论 -
c语言socket简单聊天室基于linux环境
cygwin+window+telnet测试环境 用于自己学习,里面很多用户输入会导致内存泄露, 仅仅用于个人练习 /** * gdb调试命令 * gcc -g -o aaa aaa.c //-g参数调试的时候可以看到源代码,否则是内存地址 * b 设置断点 * s 下一步,进入方法 * n 下一步,不进入方法 */ #include #include #i原创 2014-01-18 21:59:42 · 2549 阅读 · 2 评论 -
c链表联系
每天写一点点,记录脑残的那些日子 #include #include struct student{ char* name; struct stutent* next; }; typedef struct student Student; /** * create chain */ Student* create(); /** * print ch原创 2014-01-17 09:55:44 · 636 阅读 · 0 评论 -
linux线程同步
个人测试:#include#include#includechar str[100];pthread_mutex_t mutex_read,mutex_write;pthread_cond_t cond_read,cond_write;void* p1_func(void* arg){ while(1) { pthread_mutex_lock(&mutex_read); pthread_cond原创 2016-09-30 16:24:39 · 255 阅读 · 0 评论