• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
一蓑烟雨
C/C++,Linux,语音技术
博客园    首页    新随笔    联系   管理    订阅  订阅
2012年8月23日
operator(3)赋值例子
摘要: 1 #include "stdafx.h" 2 #include <iostream> 3 #include <string> 4 using namespace std; 5 6 class Test 7 { 8 public: 9 Test():mValue(2),mName("karen")10 {11 }12 Test(string x,int y)13 {14 mName = x;15 mValue = y;16 }17 ~Test()18 {19 }20 int getVal... 阅读全文
posted @ 2012-08-23 14:49 lovemu 阅读(238) 评论(0) 推荐(0)
operator(2)输入输出与比较例子
摘要: 1 #include "stdafx.h" 2 #include <iostream> 3 #include <string> 4 using namespace std; 5 6 class Test 7 { 8 public: 9 Test():mValue(2),mName("karen")10 {11 }12 Test(string x,int y)13 {14 mName = x;15 mValue = y;16 }17 ~Test()18 {19 }20 friend ... 阅读全文
posted @ 2012-08-23 11:09 lovemu 阅读(536) 评论(0) 推荐(0)
operator(1)算术与比较例子
摘要: 1 #include "stdafx.h" 2 #include <iostream> 3 #include <math.h> 4 using namespace std; 5 class Room 6 { 7 public: 8 Room() 9 {10 }11 ~Room()12 {13 }14 void setHeight(double ht)15 {16 value = ht;17 }18 double getHeight()19 {20 return (value... 阅读全文
posted @ 2012-08-23 09:45 lovemu 阅读(283) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3