c++
文章平均质量分 69
sysylh20080531
一个追梦的人···
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
c++ 快速排序实现
#ifndef QUICKSORT_H#define QUICKSORT_Htemplateclass QuickSort{ T* data; int length; void sort(int s,int e); public: void run(); QuickSort(T* dt,int l):data(dt),length(l){}; virtual ~QuickSort(){};};te原创 2014-08-25 16:23:24 · 328 阅读 · 0 评论 -
浅议 Dynamic_cast 和 RTTI
FROM:http://www.cnblogs.com/zhyg6516/archive/2011/03/07/1971898.html转载 2014-09-27 12:39:44 · 933 阅读 · 0 评论 -
c++构造函数和析构函数中的异常
情况一:够找函数原创 2014-09-04 00:43:20 · 528 阅读 · 0 评论 -
C/C++堆栈指引(函数调用框架)
FROM:http://www.cnblogs.com/Binhua-Liu/archive/2010/08/24/1803095.html转载 2014-09-03 18:35:40 · 407 阅读 · 0 评论 -
关于typedef的用法总结
不管实在C还是C++代码中,typedef这个词都不少见,当然出现频率较高的还是在C代码中。typedef与#define有些相似,但更多的是不同,特别是在一些复杂的用法上,就完全不同了,看了网上一些C/C++的学习者的博客,其中有一篇关于typedef的总结还是很不错,由于总结的很好,我就不加修改的引用过来了,以下是引用的内容(红色部分是我自己写的内容)。用途一:定义一种类型的别转载 2014-08-19 16:17:50 · 298 阅读 · 0 评论 -
c++实现标记数字、最后单词长度和小球五次落地
标记数字:#include #include using namespace std;const string mark="*";bool check_num(char c){ if(c>47&&c<58) { return true; } else { return false; }}voi原创 2014-09-11 17:35:02 · 580 阅读 · 0 评论 -
c++ string详解
转自:http://www.cnblogs.com/aduck/articles/2246168.html转载 2014-08-28 10:34:27 · 404 阅读 · 0 评论 -
对整型数组进行堆排序
上图转自百度百科。#include using namespace std;void max_heap(int *data,int i,int size){ int max=i; int temp; if((2*i+1)<size && data[i]<data[2*i+1]) { max=2*i+1; } if((2*原创 2014-09-10 22:55:30 · 539 阅读 · 0 评论 -
整型二叉查找树的C++实现
#include #include #include using namespace std;class node{ public: node* parent,*right,*left; int data; node(int k):data(k),parent(0),right(0),left(0){}};class tree{原创 2014-09-11 01:28:54 · 361 阅读 · 0 评论 -
比较扑克牌大小(输入总是正确)
#include #include using namespace std;class CompareCards{ static int checkcardstype(string& str); static char checkcardssize(char s); public: const static s原创 2014-08-26 23:24:23 · 730 阅读 · 0 评论 -
求两个字符串的最大公共子串 ,不区分大小写
#include #include #include using std::cout;using std::cin;using std::endl;using std::string;int getCommonStrLength(const char * pFirstStr, const char * pSecondStr);int main(){ strin原创 2014-08-25 23:38:10 · 763 阅读 · 2 评论 -
DNA序列问题 c++实现
类的头文件#ifndef DNABIGGC_H#define DNABIGGC_H#include #include using std::string;using std::cout;using std::endl;class DNABigGC{ static int compare(char a,char b); public:原创 2014-08-25 21:43:38 · 2330 阅读 · 1 评论 -
atoi函数和itoa函数的简单实现
#include #include using namespace std;int my_atoi(const char* in_str,const int length){ int re=0; int i=0; bool tag=false; if(in_str[0]=='-') { i=1;原创 2014-10-11 23:31:48 · 411 阅读 · 0 评论
分享