夢幻之旅

          DEBUG - 天道酬勤

             :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            671 隨筆 :: 6 文章 :: 256 評論 :: 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) 評論(0)  編輯  收藏 所屬分類: C/C++
          主站蜘蛛池模板: 平安县| 宜宾县| 阳春市| 沾益县| 仁化县| 五峰| 五指山市| 泽库县| 铜陵市| 北川| 临清市| 年辖:市辖区| 金山区| 萝北县| 阳春市| 龙泉市| 绥芬河市| 伊金霍洛旗| 太仓市| 浮山县| 吴旗县| 英吉沙县| 德州市| 库伦旗| 西宁市| 成武县| 台北县| 韶山市| 晋中市| 九江市| 桐梓县| 怀远县| 磐石市| 商丘市| 工布江达县| 凤阳县| 灵山县| 和田县| 卫辉市| 新乡市| 来凤县|