随笔分类 -  C++

上一页 1 2 3 下一页
字符串压缩
摘要:题目从文件中读取字符串,编写一个字符串压缩程序,将字符串中连续出席的重复字母进行压缩,并将压缩后的文件输出到另一文件中。压缩规则:1. 仅压缩连续重复出现的字符。比如字符串"abcbc"由于无连续重复字符,压缩后的字符串还是"abcbc".2. 压缩字段的格式为"字符重复的次数+字符"。例如:字符串... 阅读全文
posted @ 2014-12-19 11:22 叶城宇 阅读(404) 评论(0) 推荐(0)
梨园上菜鸟二
摘要:现在使用的是Git + Gerrit的代码管理工具。新的项目组里面,代码都是open。一有时间,只要你想,可以查看组内人员提交的代码。新的老大对代码的审查很是到位,对于类之间是提炼方法还是继承。完全是扣得很紧。从中可以学到很多。不过对于底层的代码研读上来说,刚毕业的人读起来确实基本上只能增加挫... 阅读全文
posted @ 2014-12-03 20:59 叶城宇 阅读(128) 评论(0) 推荐(0)
层次遍历_2014.12.2
摘要:// 层次遍历//#include "stdafx.h"#include #include using namespace std;#include #define MaxSize 100 typedef struct BiTNode { char data; struct BiTNode *lch... 阅读全文
posted @ 2014-12-02 20:23 叶城宇 阅读(308) 评论(0) 推荐(0)
cssParser
摘要://cssParser.h#include using namespace std;struct MyAttribute{MyAttribute* next;string m_strName;string m_strValue;MyAttribute(){ReSet();}void ReSet(){... 阅读全文
posted @ 2014-10-16 20:18 叶城宇 阅读(436) 评论(0) 推荐(0)
2013面试C++小结
摘要:2013年我在厦门c++求职小结1、一般公司出的面试题目中的找错误,都是出自平常公司内部使用过程中出现的真实错误。比如stl 中erase的使用:详细请见:http://blog.csdn.net/yangruibao/article/details/90400452、在C++中指针可谓之重中之重,... 阅读全文
posted @ 2014-10-12 19:37 叶城宇 阅读(178) 评论(0) 推荐(0)
Linux C 面试题总结 .
摘要:http://blog.csdn.net/sjin_1314/article/details/39861929Linux C 面试题总结 阅读全文
posted @ 2014-10-08 17:37 叶城宇 阅读(120) 评论(0) 推荐(0)
Linux C 面试题总结 .
摘要:http://blog.csdn.net/sjin_1314/article/details/39861929Linux C 面试题总结 阅读全文
posted @ 2014-10-08 17:37 叶城宇 阅读(651) 评论(0) 推荐(0)
一些有意思的面试题(持续更新) .C语言编程技巧札记
摘要:一些有意思的面试题(持续更新) http://blog.csdn.net/wangyuling1234567890/article/details/38565239C语言编程技巧札记 http://blog.csdn.net/fulinus/article/details/38758287exter... 阅读全文
posted @ 2014-08-18 17:18 叶城宇 阅读(141) 评论(0) 推荐(0)
C趣味题目
摘要:http://www.cnblogs.com/lua5/archive/2010/12/05/1896755.html c语言趣味题目http://www.cppblog.com/OnTheWay2008/archive/2010/03/24/110467.html 求一个unsigned int 数的二进制表示中有多少个1? 阅读全文
posted @ 2014-03-28 13:20 叶城宇 阅读(154) 评论(0) 推荐(0)
Logiscope学习网址
摘要:Logiscope测试机理 http://blog.csdn.net/cmy673986/article/details/9163247http://www.cnitblog.com/qiuyangzh/archive/2011/12/07/955.html---测试专业人士书写的Logiscope使用说明 http://blog.csdn.net/cmy673986/article/details/9163289 阅读全文
posted @ 2014-03-06 11:00 叶城宇 阅读(159) 评论(0) 推荐(0)
将double型小数点后面多余的零去掉
摘要:/** 函数功能:将数值小数点后面多余的零清空。* 参数描述:* [in] aSource - 输入的源数值;* [out] aDestination - 输出截取后的数值* [in] iSize - 输入源数值长度*/void cutOutZero(const char aSource[], char aDestination[], int iSize){ int iLength =0; for(int i = iSize -1; i >=0; i--) { if(aSource[i] == '0') { continue; } else { if(aSource[i] 阅读全文
posted @ 2014-03-03 14:35 叶城宇 阅读(3651) 评论(0) 推荐(0)
qt和makefile学习网址
摘要:http://blog.51cto.com/zt/20/1/ ---qt学习网站http://www.chinaunix.net/old_jh/23/408225.html [精华] 跟我一起写 Makefilehttp://blog.csdn.net/zyxlinux888/article/details/6420160 ---QT Creator 代码自动补全快捷键和输入法切换快捷键冲突问题解决 http://www.pudn.com/downloads83/ebook/detail320889.html thinkingC++下载网址 阅读全文
posted @ 2014-02-24 08:29 叶城宇 阅读(247) 评论(0) 推荐(0)
合数转换为两个素数之和
摘要://输入一个大于6的偶数,这个数一定能写成两个素数的和,比如8=3+5;#include<iostream>using namespace std; int prime(int x);void gotbaha(int x);void main(){ int a; cin>>a; if((a<6)||(a%2==1)) cout<<"the wrong number"<<endl; else gotbaha(a); }int prime(int x){ int i;for(i=2;i<x;i++) if(x%i==0 阅读全文
posted @ 2013-02-23 16:02 叶城宇 阅读(207) 评论(0) 推荐(0)
构造和析构函数
摘要:#include<iostream>using namespace std;class School{private: char*sname; int snumber,score;public: void show( ) {cout<<"sname is:"<< sname<<endl; cout<<"snumber is:"<< snumber<<endl; cout<<"score is:"<< score<<e 阅读全文
posted @ 2013-02-23 16:01 叶城宇 阅读(146) 评论(0) 推荐(0)
构造函数化简分数
摘要:#include <iostream>using namespace std;#include<cmath>class number {private :int son,mother;public: number (int son2,int mother2) { int a,b,k,i=0; if(son2>mother2) { a=son2;b=mother2;} else {a=mother2;b=son2;} for( ; ;i++) {if(a%b==0) break; else { k=a;a=b;b=k%b;} } son=s... 阅读全文
posted @ 2013-02-23 16:00 叶城宇 阅读(210) 评论(0) 推荐(0)
函数引用的简单应用
摘要://应用调用函数的引用,将一维数组的最大值换成自己输入的一个X的数,再将数组输出;# include <iostream>using namespace std;int &fun(int a[],int b);int* max;void main (void){ int a[]={5,9,8,7,12,33,66,88,7},n,x; cout<<"please enter x"<<endl; cin>>x; n=sizeof(a)/sizeof(int); fun(a,n)=x; for(int i=0;i<n 阅读全文
posted @ 2013-02-23 15:59 叶城宇 阅读(159) 评论(0) 推荐(0)
汉诺塔问题1
摘要:# include <iostream>using namespace std;void move (int n,char a,char b){ cout<<n<<"盘"<<a<<" to "<<b<<endl;}void h1(int n,char x,char y,char z){ if(n==1) move(n,x,z); else { h1(n-1,x,y,z); move (n,x,z); h1(n-1,y,x,z); }}void main (){ int n 阅读全文
posted @ 2013-02-23 15:56 叶城宇 阅读(138) 评论(0) 推荐(0)
字符数组拷贝2
摘要:#include<iostream>using namespace std;char dest[10] ;char* copystr(char source[], int m ,int x) { int i,j=0; for(i=m-1;i<x;i++) { dest[j]=source[i]; j++;} char *p=dest; return p; }void main(){ int i,m,x; char source[10] ; for(i=0;i< 10;i++) cin>>source[i]; cout<<"请输入0-10 阅读全文
posted @ 2013-02-23 15:55 叶城宇 阅读(187) 评论(0) 推荐(0)
字符数组拷贝1
摘要:#include<iostream>using namespace std;void copystr(char source[],char dest[],int m ,int x) { int i,j=0 ; for(i=m-1;i<x;i++) { dest[j]=source[i]; j++;} }void main(){ int i,m,x; char source[10],dest[10]; for(i=0;i< 10;i++) cin>>source[i]; cout<<"请输入0-10之间的数"<<en 阅读全文
posted @ 2013-02-23 15:54 叶城宇 阅读(165) 评论(0) 推荐(0)
位操作2
摘要://某任务需要在A、B、C、D、E着5人中物色人员去完成,但派人受限于下列条件://(1)若A去,则B跟去(2)D、E两人中必有人去(3)B,C两人中必有人去,但只去一人//(4)C,D两人要么都去,要么都不去(5)若E去,则A,B都去#include<iostream>using namespace std;void print(int n);void main(){ for(int i=0;i<32;i++){ if(i>>4 && !((i & 8) ))continue; if(!((i&2) ) &&!(i 阅读全文
posted @ 2013-02-23 15:45 叶城宇 阅读(153) 评论(0) 推荐(0)

上一页 1 2 3 下一页