自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 资源 (24)
  • 收藏
  • 关注

原创 初始化列表的初始化变量顺序是根据成员变量的声明顺序来执行的

#include#includeusing namespace std;class base{private: int m_j; int m_i;public: base(int i):m_j(i),m_i(m_j) {} base():m_j(0),m_i(m_j) {} int get_i() {return m_i; } int get_j()

2013-06-02 23:51:15 732 1

原创 一个整数转化为二进制数后包含1的个数

int Func(int x){      int count=0;      while(x!=0)      {         count++;         x=x&(x-1);      }      return count;}int _tmain(int argc, _TCHAR* argv[]){      int x=9999;

2012-11-25 21:10:37 811

原创 人员信息管理(Ⅴ)

<br />//employee.h 类的定义<br />class employee<br />{<br />protected:<br />    char name[20];<br />    int individualEmpNo; //个人编号<br />    int grade;    //级别<br />    float accumPay;  //月薪<br />    static int employeeNo; //本公司职员编号目前最大值<br />public:<br />   

2010-06-03 22:22:00 635

原创 人员信息管理(Ⅴ)

<br />//employee.h 类的定义<br />class employee<br />{<br />protected:<br />    char name[20];<br />    int individualEmpNo; //个人编号<br />    int grade;    //级别<br />    float accumPay;  //月薪<br />    static int employeeNo; //本公司职员编号目前最大值<br />public:<br />   

2010-06-03 22:14:00 631

原创 人员信息管理(Ⅳ)

<br />//employee.h 类的定义<br />class employee<br />{<br />protected:<br />    char name[20];<br />    int individualEmpNo; //个人编号<br />    int grade;    //级别<br />    float accumPay;  //月薪<br />    static int employeeNo; //本公司职员编号目前最大值<br />public:<br />   

2010-06-03 22:10:00 665

原创 人员信息管理(Ⅲ)

<br />class employee<br />{<br />protected:<br />    char name[20];<br />    int individualEmpNo; //个人编号<br />    int grade;    //级别<br />    float accumPay;  //月薪<br />    static int employeeNo; //本公司职员编号目前最大值<br />public:<br />    employee();<br />    ~e

2010-06-03 22:07:00 767

原创 人员信息管理(Ⅱ)

<br />class employee<br />{<br />protected:<br />    int individualEmpNo; //个人编号<br />    int grade;    //级别<br />    float accumPay;  //月薪<br />    static int employeeNo; //本公司职员编号目前最大值<br />public:<br />    employee();<br />    ~employee();<br />    void

2010-06-03 22:03:00 621

原创 人员信息管理(Ⅰ)

<br />class employee<br />{<br />protected:<br />    int individualEmpNo; //个人编号<br />    int grade;    //级别<br />    float accumPay;  //月薪<br />public:<br />    employee();<br />    ~employee();<br />    void IncreaseEmpNo(int); //增加编号函数<br />    void pro

2010-06-03 22:02:00 640

原创 fatal error C1010: unexpected end of file while looking for precompiled header directive

<br />在编译VC++6.0是,出现<br />fatal error C1010: unexpected end of file while looking for precompiled header directive<br /><br />问题详细解释:<br />致命错误C1010,在寻找预编译指示头文件时,文件未预期结束。就是没有找到预编译指示信息的头文件。<br /><br />问题一般发生在:<br />通过添加文件的方式,添加了一些cpp文件到一个MFC的程序,但该cpp文件并不是MF

2010-06-03 21:49:00 485

原创 Array类的应用:求范围2~n中的质数,n在程序运行时由键盘输入

<br />//Array.h<br />const int null = 0; <br />enum ErrorType   //错误类型集合,共有三种错误:数组大小错误、内存分配错误和下标越界<br />{invalidArraySize,memoryAllocationError,indexOutOfRange};<br />char *errorMsg[]=<br />{<br />  "Invalid array size","Memory allocation error",<br />  "I

2010-06-02 20:28:00 1053

原创 栈的应用——一个简单的整数计算器

<br />实现一个简单的整数计算器,能够进行加、减、乘、除和乘方运算。使用时算式采用后缀输入法,每个操作数、操作符之间都以空白符分隔。乘方运算用“^”表示。每次运算在前次结果基础上进行,若要将前次运行结果清除,可键入“c”。当键入“q”时程序结束。<br />//stack.h<br />#include<iostream><br />#include<cstdlib><br />#include<cmath><br />#include<cstring><br />using namespace std

2010-06-02 10:25:00 876

转载 总结必须学习的10项.NET技术

      1、WCF (Windows Communication Foundation):虽然WCF显然没有WPF或SilverLight那么吸引人,但是它却是在.NET框架下解决业务问题的基础。所以你今年至少要学习一门.NET的新技术,那你就选择WCF吧。  2、ADO.NET (and LINQ):这是让你与数据层打交道的技术。并且LINQ提供了将各种数据组合起来的方法。如果以上两个技术你都不熟悉的话,那就等着被人来抢你饭碗吧。  3、WPF (Windows Presentation Founda

2010-06-01 10:58:00 621 1

原创 单目运算符“++”重载为成员函数形式

#includeusing namespace std;class Clock{public:    Clock(int NewH=0,int NewM=0,int NewS=0);    void ShowTime();    Clock& operator ++();    Clock operator ++(int);private:    int Hour,Minute,Second;};Clock::Clock(int NewH,int NewM,int NewS){   if(0   { Hou

2010-06-01 09:13:00 1436

原创 运算符重载为成员函数

#includeusing namespace std;class complex  //复数类定义{public: complex(double r=0.0,double i=0.0) {real=r;imag=i;}     complex operator + (complex c2); //运算符+重载成员函数 complex operator - (complex c2); //运算符-重载成员函数 void display();private: double real; double imag;

2010-06-01 09:11:00 1001

原创 运算符重载为友元函数举例

#includeusing namespace std;class complex  //复数类定义{public: complex(double r=0.0,double i=0.0) {real=r;imag=i;}     friend complex operator + (complex c1,complex c2); //运算符+重载友元函数 friend complex operator - (complex c1,complex c2); //运算符-重载友元函数 void display(

2010-06-01 09:09:00 654

原创 冒泡排序举例

#includetemplatevoid Swap(T &x,T &y){    T temp;    temp=x;    x=y;    y=temp;}template void BubbleSort(T A[],int n){  int i,j;  int lastExchangeIndex;  i=n-1;  while(i>0

2010-05-31 20:53:00 609

原创 直接选择排序举例

<br />#include<iostream><br />template<class T><br />void Swap(T &x,T &y)<br />{<br />    T temp;<br />    temp=x;<br />    x=y;<br />    y=temp;<br />}<br /> <br />template <class T><br />void SelectionSort(T A[],int n)<br />{<br />  int smallIndex;<br />

2010-05-31 20:52:00 666

原创 直接插入排序举例

<br />#include<iostream><br />template<class T><br />void InsertionSort(T A[],int n)<br />{<br />   int i,j;<br />   T temp;<br />   for(i=1;i<n;i++)<br />   {<br />     j=i;<br />     temp=A[i];<br />     while(j>0&&temp<A[j-1])<br />     { <br />     A[j

2010-05-31 20:50:00 843

原创 折半查找函数模板举例

<br />初始化int类型数组data1={1,3,5,7,9,11,13,15,17,19,2,4,6,8,10,12,14,16,18,20},提示用户输入一个数字,应用折半查找函数模板找出它的位置。<br />#include<iostream><br />using namespace std;<br />template<class T><br />int BinSearch(T list[],int n,T key)<br />{<br />   int mid,low,high;<br />

2010-05-31 20:39:00 1799

原创 顺序查找函数模板举例

<br />初始化int类型数组data1[]={1,3,5,7,9,11,13,15,17,19,2,4,6,8,10,12,14,16,18,20},提示用户输入一个数字,应用顺序查找函数模板找出它的位置。<br />#include<iostream><br />using namespace std;<br />template<class T><br />int SeqSearch(T list[],int n,T key)<br />{<br />  for(int i=0;i<n;i++)<b

2010-05-31 20:36:00 1830

原创 C++中的引用和指针

<br />引用和指针有何区别?何时只能使用指针而不能使用引用?  <br />   引用是一个别名,不能为 NULL 值,不能被重新分配;指针是一个存放地址的变量。当需要对变量重新赋以另外的地址或赋值为 NULL 时只能使用指针。

2010-05-31 16:44:00 337

原创 C++中的引用和指针

<br />引用和指针有何区别?何时只能使用指针而不能使用引用?  <br />   引用是一个别名,不能为 NULL 值,不能被重新分配;指针是一个存放地址的变量。当需要对变量重新赋以另外的地址或赋值为 NULL 时只能使用指针。

2010-05-31 16:44:00 356

原创 拷贝构造函数与赋值运算符(=)有何不同?

<br />拷贝构造函数与赋值运算符(=)有何不同?<br />  赋值运算符(=)作用于一个已存在的对象;而拷贝构造函数会创建一个新的对象。

2010-05-31 16:42:00 2388

原创 使用关键字const 而不是#define 语句的好处有哪些

<br />使用关键字 const 而不是#define 语句的好处有哪些?<br />解:  <br />const 定义的常量是有类型的,所以在使用它们时编译器可以查错;而且,这些变量在调试<br />时仍然是可见的。

2010-05-31 16:41:00 1098

原创 编写程序定义Point类,有数据成员X,Y,为其定义友元函数实现重载+。

<br />#include <iostream.h><br />class Point<br />{<br />public:<br />   Point() { X = Y = 0; }<br />   Point( int x, int y ) { X = x; Y = y; }<br />   void Print() { cout << "Point(" << X << ", " << Y << ")" << endl; }<br />   friend Point operator+( Poin

2010-05-31 16:40:00 17069 2

原创 编写一个类Rectangle,有长itsLength,宽itsWidth等数据成员,有重载的构造函数Rectangle()、Rectangle(int width,int length)。

<br />#include<iostream><br />using namespace std;<br />class Rectangle<br />{<br />public:<br />   Rectangle() {itsLength=10,itsWidth=5;}<br />   Rectangle(int length ,int width) {itsLength=length;itsWidth=width;}<br />   ~Rectangle() {}<br />   int GetLe

2010-05-31 16:03:00 6471

原创 编写四个重载函数Double(x),返回值为输入参数的两倍;参数类型分别为int,long,float,double,返回值类型与参数类型一致。

<br />#include<iostream><br />using namespace std;<br />int Double(int x);<br />long Double(long x);<br />float Double(float x);<br />double Double(double x);<br />int main()<br />{<br />   int myInt = 6500;<br />   cout<<Double(myInt)<<endl;<br />   long

2010-05-31 15:44:00 2539

.Net c#使用PDFBox解析PDF文件

在.Net中使用PDFBox需要引用: 1.PDFBox-0.7.3.dlll (8 MB) 2.IKVM.GNU.Classpath (7 MB) 3.IKVM.Runtime.dll (360 kB) 4.FontBox-0.1.0-dev.dll 使用方法: private static string parseUsingPDFBox(string filename) { PDDocument doc = PDDocument.load(filename); PDFTextStripper stripper = new PDFTextStripper(); return stripper.getText(doc); }

2011-04-20

VS2008中用Chart控件条状图

VS2008中用Chart控件绘制的条状图例子

2011-03-13

VS2008中用Chart组件画折线图

VS2008中用Chart组件画折线图的例子

2011-03-13

C#写的新浪微博批量抓取器

一个用C#写的实现新浪微博结果的批量抓取

2011-01-23

登陆框窗体应用程序 c++.net

登陆框窗体应用程序 Visual c++.net做的例子

2010-11-27

MFC 交通灯例子源码下载

MFC 一个简单的做的交通灯的例子 好东西源码下载

2010-11-27

C语言的100个经典算法

C语言的100个经典算法 超经典......

2010-11-27

VC动态链接库(dll)例子

VC dll例子 操作步骤见http://hi.baidu.com/ensteinniesen/blog/item/5efd87e78734cd3eb838206c.html

2010-11-25

Google搜索从入门到精通

Google搜索从入门到精通 介绍搜索技巧的经典之作...

2010-10-29

陆钟万面向计算机科学的数理逻辑.pdf

陆钟万面向计算机科学的数理逻辑.pdf 中科院经典教材......

2010-10-28

数据为挖掘pdf 韩家炜

数据为挖掘领域的大牛 经典版 pdf 韩家炜

2010-10-28

C#中类、属性、字段、方法举例

C#中类、属性、字段、方法简单小例子 C#简单入门

2010-08-21

C#中数组做参数的小例子

C#中数组做参数小例子 C#入门好资料.....

2010-08-21

利用正则表达式奇虎论坛抓取

利用正则表达式抓取网页内容 学习正则表达式的小例子...

2010-08-21

C#中ListBox和CheckedListBox操作例子

C#中ListBox和CheckedListBox

2010-07-24

C#与Access数据库的连接

C#与Access数据库的操作,实现增、删、改、查。

2010-07-24

C#课程设计——多文档编辑器

由于是初次学习,自己做的难免有很多不足,还请多多指教!

2009-06-28

sql2000数据库应用技术课件

sql2000数据库课件,共享了......

2009-01-09

人事管理系统sql2000+delphi7.0

一个sql2000+delphi7.0做的人事管理系统,请多多指教......

2008-12-28

C++课件—清华大学出版社

《C++程序设计——清华大学出版社,经典版。好好看看啊......

2008-12-19

数据结构课件—很经典的

数据结构课件—中国水利水电出版社。 很经典的,很不错啊,呵呵....

2008-12-18

sql数据库原理人事管理系统

sql数据库原理课程设计 需求分析,逻辑概念结构设计,逻辑结构设计,数据库的运行和实施......

2008-12-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除