夢(mèng)幻之旅

          DEBUG - 天道酬勤

             :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評(píng)論 :: 0 Trackbacks
          Persion.h
          #include <string>
          using namespace std;

          #ifndef PERSION_H
          #define PERSION_H
          class Persion
          {
          private:
              
          string name;
          public:
              Persion(
          string name);
              
          void say();
          }
          ;
          #endif
          Persion.cpp
          #include <iostream>
          #include 
          <string>
          #include 
          "Persion.h"
          using namespace std;
          Persion::Persion(
          string name)
          {
              
          this->name=name;
          }

          void Persion::say()
          {
              cout
          <<"my name is "<<this->name<<endl;
          }

          void main()
          {
              Persion persion(
          "huyvanpull");
              Persion 
          *pPersion = &persion;
              pPersion
          ->say();
          }

          posted on 2009-07-02 21:04 HUIKK 閱讀(219) 評(píng)論(0)  編輯  收藏 所屬分類: C/C++

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 宁蒗| 潞西市| 南雄市| 裕民县| 延边| 新巴尔虎右旗| 朝阳市| 临城县| 林州市| 出国| 彩票| 宁城县| 九龙城区| 通化市| 普陀区| 阜宁县| 四平市| 北票市| 东光县| 深泽县| 清镇市| 文登市| 临江市| 喜德县| 惠安县| 宝鸡市| 闸北区| 昭觉县| 保德县| 防城港市| 法库县| 济阳县| 荣昌县| 屯门区| 阜宁县| 利津县| 遂昌县| 钟祥市| 桂林市| 保康县| 灌南县|