
C++
Wei_Yang_JXNU
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++开源库
一、通用标准类:STL BOOST DEELX 二、XML解析库:基于DOM的有TinyXml,基于SAX的Xerces 三、数据库:MySQL 四、多媒体:SDL(用于游戏编程)原创 2017-01-01 16:13:15 · 369 阅读 · 0 评论 -
浅谈C++容器(转)
什么是容器 首先,我们必须理解一下什么是容器,在C++ 中容器被定义为:在数据存储上,有一种对象类型,它可以持有其它对象或指向其它对像的指针,这种对象类型就叫做容器。很简单,容器就是保存其它对象的对象,当然这是一个朴素的理解,这种“对象”还包含了一系列处理“其它对象”的方法,因为这些方法在程序的设计上会经常被用到,所以容器也体现了一个好处,就是“容器类是一种对特定代码重用问题的良好的解决方案转载 2017-01-01 16:14:59 · 352 阅读 · 0 评论 -
顺序容器vector、deque和List练习
(1)顺序容器vector练习 #include #include #include #include //调用sort函数 using namespace std; int main() { //顺序容器练习 整形 vector arr; for(int i=6;i>0;i--) arr.push_back(i); for(int j=0;j原创 2017-01-01 16:20:42 · 579 阅读 · 0 评论 -
关联式容器映射map练习
//管理学生名册 #include #include #include using namespace std; struct student { string id; string name; int grade; }; int main() { map stubook; student stu; cout for(int i=0;i {原创 2017-01-01 16:22:14 · 485 阅读 · 0 评论 -
C++文件练习
(1) //读入文件中的数,将其输出,并且找出最大的,再写入到文件中去 #include #include #include using namespace std; int main() { fstream file; int x=0,max=0; file.open("c:\\a.txt",ios::in|ios::out); //以读写方式打开文件,原创 2017-01-01 16:23:35 · 386 阅读 · 0 评论 -
项目实践---字典
//首先在C盘建个文件: love 爱 I 我 choice 选择 //创建zidian.cpp #include #include"dic.h" using namespace std; int main() { cout cout cout dic zidian; string word; i原创 2017-01-01 16:25:38 · 388 阅读 · 0 评论 -
数据结构----单链表(c++)
题目:输入数据建立节点,并求相邻俩节点data值之和为最大的第一节点,例如:输入:2 6 4 7 3 0(0为结束) 结果:4 程序: #include using namespace std; class list { private: int data; list *next; public: list *crea原创 2017-01-01 16:29:05 · 384 阅读 · 0 评论 -
Huffman编码---C++
题目:电文字符集D及各个字符出现概率F如下: D={a,b,c,d,e,f,f,h} F= {5,29,7,8,14,23,3,11} 编写程序:打印D各字符的Huffman编码。 程序: Huffman.cpp文件 #include #include #include #include #include"huffam.h"原创 2017-01-01 16:29:58 · 602 阅读 · 0 评论