当前位置:首页 » 服务器技术
开发技术指南» 文章正文
    引言: void get_date( const elemtype )
 

 

 ·我看oop(四)    »显示摘要«
    摘要: 不要重新发明轮子是一句经典的oop格言,它的潜台词是轮子已经被发明,我们的任务是重用这个轮子。重用是oop的重要思想,但不局限于oop,从有人类文明以来,我们在不断追求提高重用度以提高生产力。 从某种意义上说正是重用引发了社会的分工,使程序最大限度的被重用使现代软件发展的一个趋势。大家熟知的c程序hello world已经包含了重用思想,虽然从面向对象的角度看这种重用较为低级。 #include <stdio.h> main( ) { pri......
 ·introducing software process maturity    »显示摘要«
    摘要:摘自《the capability maturity model guidelines for improving the software process》 the search for solutions to these challenges has continued for many years. after two decadesof unfulfilled promises about productivity and quality gai......


【头文件】c++实现二叉树

#ifndef bitree_h

#define bitree_h 【相关文章:Delphi IDE使用的一些主要技巧

【扩展阅读:"Filter-Hook Dr

template<typename elemtype> class bitnode 【扩展信息:G时代免费大餐

{

public:

 bitnode();//构造函数

 bitnode( const bitnode<elemtype>& );//拷贝构造函数

 const elemtype date () const;//读取数据

 const bitnode<elemtype> *lchild () const;//返回左指针

 const bitnode<elemtype> *rchild () const;//返回右指针

 void get_date( const elemtype );//输入数据

 void get_lchild ( const bitnode<elemtype>* );//输入左指针

 void get_rchild ( const bitnode<elemtype>* );//输入右指针

 void operator =( const bitnode<elemtype>& );//赋值

private:

 elemtype    _date;//节点数据

 bitnode<elemtype> *_lchild,*_rchild;//左右孩子指针

 };//二叉树的节点

//bitnode类函数实现

template<typename elemtype>

 bitnode<elemtype>::bitnode()

 {

  get_date( 0 );

  get_rchild( 0 );

  get_lchild( 0 );

 }

template<typename elemtype >const

 bitnode<elemtype>* bitnode<elemtype>::lchild() const

 {

  return _lchild;

 }

template<typename elemtype> const

 bitnode<elemtype>* bitnode<elemtype>::rchild() const

 {

  return _rchild;

 }

template<typename elemtype> const

 elemtype bitnode<elemtype>::date () const

 {

  return _date;

 }

template<typename elemtype>

 void bitnode<elemtype>::get_date( const elemtype de )

 {


...   下一页
    摘要:public class test : itestinterface //test要实现itestinterface接口,在用vs开发时可以按tab键让vs自动生成 { public test() { } } public interface itestinterface { public itestinterface(){}//这里是错误的,因为接口是不能带构造函数的 void func1(); } ---------------------------......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE