摘要:
这是最基本的String的实现/**ThebasicimplementationofString*/#include#include#includeusingstd::istream;usingstd::ostream;usingstd::cout;usingstd::endl;usingstd::cin;usingstd::setw;classString{public:friendistream&operator>>(istream&,String&);friendostream&operator(constString&)const;b 阅读全文
posted @ 2012-08-24 10:40
Mr.Rico
阅读(146)
评论(0)
推荐(0)
摘要:
JM中的有用程序#if0/**1.dct方法*/#include#include#include#defineM16#defineBLOCK_SIZE4staticinttmp[M];voidforward4x4(int(*block)[M],int(*tblock)[M],intpos_y,intpos_x){inti,ii;int*pTmp=tmp,*pblock;staticintp0,p1,p2,p3;staticintt0,t1,t2,t3;//Horizontalfor(i=pos_y;i#include#include#defineM16#defineBLOCK_SIZE4sta 阅读全文
posted @ 2012-08-24 10:37
Mr.Rico
阅读(229)
评论(0)
推荐(0)
摘要:
linux下的示例程序#if0/**1.遍历目录-1*/#include#include#include#includevoidshow_directory(char*path){DIR*dir;structdirent*entry;staticintcount=0;inti=0;intj=0;if(NULL==(dir=opendir(path)))printf("erroropeningdir\n");else{chdir(path);//system("pwd");count+=1;while(entry=readdir(dir)){//if(st 阅读全文
posted @ 2012-08-24 10:36
Mr.Rico
阅读(359)
评论(0)
推荐(0)
摘要:
C++的示例程序:1.#if0/*1.C++中整数/浮点等转化为字符串*/#include//forthe//forostringstream#include//forstringtemplatestd::stringto_string(Tconst&obj){std::ostringstreamout;out//forthe>>operator#include//forostringstream#include//forstringtemplateTfrom_string(std::stringconst&str){std::istringstreamin(str 阅读全文
posted @ 2012-08-24 10:28
Mr.Rico
阅读(678)
评论(0)
推荐(0)

浙公网安备 33010602011771号