第三章 類與對象應用

學習目的

  • 掌握靜態(tài)數(shù)據(jù)成員及靜態(tài)成員函數(shù)的使用;
  • 掌握友元函數(shù)的使用;
  • 掌握常成員函數(shù)的應用;
  • 掌握對象成員的使用;
  • 掌握C++11中移動復制構(gòu)造函數(shù)、委托構(gòu)造函數(shù)等語言擴展機制箫老。

實習任務

  • 實習任務一

  1. 調(diào)試運行下面的程序栋猖,記錄程序運行結(jié)果
#include <iostream> 
#include <string> 
using namespace std; 
class Mouse{
public:
    Mouse( string newName ); ~Mouse();
    string getName() { 
        return name; 
    } 
    static int mouseNum;/*static int 不會隨著函數(shù)的結(jié)束而銷毀*/
private:
    string name;
};
int Mouse::mouseNum = 0;
Mouse::Mouse( string newName ) : name(newName){
    cout<<name<<" is born!\n";
    mouseNum++; 
}
Mouse::~Mouse(){ 
    cout<<name<<" is gone...\n";
    mouseNum--; 
}
class Cat{ 
public:
    Cat( const string& newName): name(newName){ 
        cout<<name<<" is coming!\n";
    }
    void catchMouse( Mouse *pMouse); 
private:
    string name; 
};
    void Cat::catchMouse( Mouse *pMouse){
        cout<<"I catch you! I never want to see you again. "<<pMouse->getName()<<" !"<<endl; 
    delete pMouse;
}
int main()
{
    Cat cat("Black Cat Detective");
    Mouse *pMouse1 = new Mouse("Micky"); 
    cout<<Mouse::mouseNum<<" mouse left.\n"; 
    Mouse *pMouse2 = new Mouse("Xiaohua"); 
    cout<<Mouse::mouseNum<<" mouse left.\n"; 
    cat.catchMouse(pMouse2); 
    cout<<Mouse::mouseNum<<" mouse left.\n"; 
    cat.catchMouse(pMouse1); 
    cout<<Mouse::mouseNum<<" mouse left.\n"; 
    return 0;
}

static 在main里面的區(qū)別不大办铡,其它函數(shù)里面區(qū)別很大,static變量能保持上次調(diào)用后的結(jié)果杖玲,int在函數(shù)返回后就銷毀了办素,下次調(diào)用又重新建立诞帐。如:

#include <iostream>
void add(){
    static int a = 0;
    std::cout<<a;
    a++;
}
int main()
{
    for(int i=0;i<10;i++){
        add();
    }
    return 0;
}
運行結(jié)果:0123456789[Finished in 0.3s]
運行結(jié)果:
Black Cat Detective is coming!
Micky is born!
1 mouse left.
Xiaohua is born!
2 mouse left.
I catch you! I never want to see you again. Xiaohua !
Xiaohua is gone...
1 mouse left.
I catch you! I never want to see you again. Micky !
Micky is gone...
0 mouse left.
[Finished in 0.3s]

2.調(diào)試運行下面的程序欣尼,記錄程序運行結(jié)果

#include <iostream> 
using namespace std; 
class TestClass{ 
public:
    TestClass( int newValue=0) {
    value = newValue;
    cout<<"Value: "<<value<<", Constructed!\n";
    }
    TestClass( const TestClass & rhs){
        value = rhs.value;
        cout<<"Value: "<<value<<", Copy Constructed!\n"; 
    }
    ~TestClass() { cout<<"Value: "<<value<<", Destructed!\n"; } void setValue( int newValue) { value = newValue; }
    int getValue()const { //常成員函數(shù)
        return value; 
    }
private:
    int value;
};
TestClass fooFun( TestClass t){
    t.setValue(20);
    return t; 
}
int main(){
    TestClass t1(10),t2(t1),t3; 
    t3=fooFun(t1);
    return 0;
}
運行結(jié)果
Value: 10, Constructed!
Value: 10, Copy Constructed!
Value: 0, Constructed!
Value: 10, Copy Constructed!
Value: 20, Copy Constructed!
Value: 20, Destructed!
Value: 20, Destructed!
Value: 20, Destructed!
Value: 10, Destructed!
Value: 10, Destructed!
[Finished in 0.3s]
  1. 將程序1中的fooFun傳遞對象作為參數(shù)和返回對象修改為傳遞引用以及返回引用,重新運行程序景埃,記錄運行結(jié)果媒至。
TestClass & fooFun(TestClass &t){
    t.setValue(20);
    return t;
}
運行結(jié)果:
Value: 10, Constructed!
Value: 10, Copy Constructed!
Value: 0, Constructed!
Value: 20, Destructed!
Value: 10, Destructed!
Value: 20, Destructed!
[Finished in 0.5s]
  • 實習任務二

實習 2 中的分數(shù)類還很不完善顶别,請按照下面定義和要求完善分數(shù)類。

  1. 將 Complex 類中的 getDoubleValue拒啰、getNum驯绎、getDen、output 定義為常成員函數(shù)谋旦。將構(gòu)造函數(shù)的實現(xiàn)寫成初始化列表的形式剩失。
  2. 添加常成員函數(shù) add,實現(xiàn)復數(shù)相加計算册着,計算結(jié)果返回一個新的復數(shù)對象拴孤,為Complex類型。
  3. 添加成員函數(shù) multiply甲捏,實現(xiàn)當前復數(shù)的向量放大計算演熟,實部和虛部同時放大,返回類型為 void司顿。

常成員函數(shù)是指由const修飾符修飾的成員函數(shù)芒粹,在常成員函數(shù)中不得修改類中的任何數(shù)據(jù)成員的值。

#include <iostream>
#include <cmath>
using namespace std;
class Complex{
public:
    // Complex(){
    //     real = 0;
    //     image = 0;
    // }
    // Complex(double n){
    //     real = n;
    //     image = 0;
    // }
    Complex(double n=0, double d=0){
        real = n;
        image = d;
    }
    void setValue(double n, double d){
        real = n;
        image = d;
    }
    Complex add(const Complex &c )const{
        Complex x;
        x.setValue(real+c.getReal(), image+c.getImage());
        return x;
    }
    double getReal()const{
        return real;
    }
    double getImage()const{
        return image;
    }
    double getDistance()const{
        return sqrt(pow(real,2)-pow(image,2));
    }
    void multiply(double c){
        setValue(real*c, image*c);
    }
    void output()const{
        if(image == 0 && real != 0){
            cout<<real<<endl;
        }
        else if(image !=0 && real ==0){
            cout<<image<<'i'<<endl;
        }
        else if(image == 0 && real == 0){
            cout<<0<<endl;
        }
        else{
            if(image<0){
                cout<<real<<image<<'i'<<endl;
            }
            else{
                cout<<real<<'+'<<image<<'i'<<endl;
            }
        }
    }
private:
    double real;
    double image;
};
int main(){
    Complex c1, c2(2), c3(3,4);
    c1.output();
    c2.output();
    c3.output();
    c3.multiply(3);
    c3.output();
    c2.add(c3).output();
    c1.setValue(6,4);
    c1.output();
    cout<<c1.getDistance()<<endl;

    return 0;
}
運行結(jié)果:
0
2
3+4i
9+12i
11+12i
6+4i
4.47214
[Finished in 0.3s]
  • 實習任務三

  1. 完善實習2中的Time類
#include <iostream>
#include <cmath>
using namespace std;
class Time{
public:
    Time(){
        hour = 0;
        minute = 0;
        normalizeTime();
    }
    Time(int h, int m){
        hour = h;
        minute = m;
        normalizeTime();
    }
    Time(int minutes){
        hour = (minutes/60)%24;
        minute = minutes%60;
        normalizeTime();
    }
    void setTime(int h, int m){
        hour = h;
        minute = m;
        normalizeTime();
    }
    void output()const{
        
        cout<<hour<<':'<<minute<<endl;
    }
    int getHour()const{
        return hour;
    }
    int getMinute()const{
        return minute;
    }
    int getTotalMinutes()const{
        return hour*60 + minute;
    }
    Time getTimeSpan(const Time &t)const{
        Time x;
        int dis = abs(getTotalMinutes() - t.getTotalMinutes());
        x.setTime((dis/60)%24, dis%60);
        return x;
    }
private:
    int hour;
    int minute;
    void normalizeTime(){
        hour = ((60*hour + minute)/60)%24;
        minute = minute%60;
    }
};
int main(){
    Time t1(12, 75);
    t1.output();
    t1.setTime(8, 65);
    t1.output();
    Time t2(12, 13);
    t1.getTimeSpan(t2).output();
    cout<<"t1 Hour:"<<t1.getHour()<<endl;
    cout<<"t1 Minute:"<<t1.getMinute()<<endl;
    cout<<"t1 getTotalMinutes:"<<t1.getTotalMinutes()<<endl;

    return 0;
}
運行結(jié)果:
13:15
9:5
3:8
t1 Hour:9
t1 Minute:5
t1 getTotalMinutes:545
[Finished in 0.3s]
  1. 停車收費問題
class ParkingCard{
public:
    ParkingCard(double newRate){
        rate = newRate;
    }
    void setRate(double newRate){
        rate = newRate;
    }
    double getRate()const{
        return rate;
    }
    void setParkingTime(const Time &time){
        parkingTime.setTime(time.getHour(), time.getMinute());
    }
    void setLeavingTime(const Time &time){
        leavingTime.setTime(time.getHour(), time.getMinute());
    }
    double getTotalExpenses()const{
        Time x = parkingTime.getTimeSpan(leavingTime);
        return x.getTotalMinutes()*(rate/60.0);
    }
    void output()const{
        cout<<"Your parking time: ";
        parkingTime.output();
        cout<<"Our parking rate: ";
        cout<<rate<<endl;
        cout<<"Your total expenses: ";
        cout<<getTotalExpenses()<<endl<<endl;
    }
private:
    double rate;
    Time parkingTime;
    Time leavingTime;
};
int main(){
    ParkingCard card(5);
    card.setParkingTime(Time(9,20));
    card.setLeavingTime(Time(11,35));
    cout<<"Expenses:"<<card.getTotalExpenses()<<endl;
    cout<<"Detailed info:\n";
    card.output();
    return 0;
}
運行結(jié)果:
Expenses:11.25
Detailed info:
Your parking time: 9:20
Our parking rate: 5
Your total expenses: 11.25

[Finished in 0.3s]
  • 實習任務四

  1. Point 類?
#include <iostream>
#include <cmath>
using namespace std;
class Point{
public:
    Point():x(0), y(0){}//初始化列表
    Point(double newX, double newY){
        setValue(newX, newY);
    }
    Point(const Point &p){
        setValue(p.getX(), p.getY());
    }
    
    //~Point();
    void setValue(double newX, double newY){
        x = newX;
        y = newY;
    }
    double getX()const{return x;}
    double getY()const{return y;}
    double getDistance(const Point &p2)const{
        return sqrt(pow(x-p2.getX(),2)+pow(y-p2.getY(),2));
    }
    friend double getDistance(const Point &p1, const Point &p2){
                return sqrt(pow(p1.getX()-p2.getX(),2)+pow(p1.getY()-p2.getY(),2));
    }//友元函數(shù)
private:
    double x,y;
};

int main()
{
    Point p1(3,4);
    Point p2(5,2);
    double distance = p1.getDistance(p2);
    cout<<"Distance:"<<distance<<endl;
    distance = getDistance(p1,p2);
    cout<<"Distance:"<<distance<<endl;
    return 0;
}
運行結(jié)果:
Distance:2.82843
Distance:2.82843
[Finished in 0.4s]
  1. 三角形類
#include <iostream>
#include <cmath>
using namespace std;
class Point{
public:
    Point():x(0), y(0){}//初始化列表
    Point(double newX, double newY){
        setValue(newX, newY);
    }
    Point(const Point &p){
        setValue(p.getX(), p.getY());
    }
    
    ~Point(){}
    void setValue(double newX, double newY){
        x = newX;
        y = newY;
    }
    double getX()const{return x;}
    double getY()const{return y;}
    double getDistance(const Point &p2)const{
        return sqrt(pow(x-p2.getX(),2)+pow(y-p2.getY(),2));
    }
    friend double getDistance(const Point &p1, const Point &p2){
                return sqrt(pow(p1.getX()-p2.getX(),2)+pow(p1.getY()-p2.getY(),2));
    }//友元函數(shù)
private:
    double x,y;
};
class Triangle{
public:
    Triangle(const Point &p1, const Point &p2, const Point &p3){
        this->p1 = p1;
        this->p2 = p2;
        this->p3 = p3;
    }
    double getArea()const{
        return abs((1/2.0)*(p1.getX()*p2.getY()-p1.getY()*p3.getX()-p1.getY()*p2.getX()*p3.getY()+p3.getX()*p2.getY()+p1.getX()*p3.getY()+p2.getX()*p1.getY()));
    }
    double getPerimeter()const{
        return getDistance(p1,p2)+getDistance(p2,p3)+getDistance(p1,p3);
    }
private:
    Point p1, p2, p3;
};
int main()
{
    Point p1(0,0), p2(0,3), p3(4,0);
    Triangle t(p1, p2, p3);
    cout<<"Area:"<<t.getArea()<<endl;
    cout<<"Perimeter:"<<t.getPerimeter()<<endl;
    return 0;
}
運行結(jié)果:
Area:6
Perimeter:12
[Finished in 0.3s]
  • 課后練習

#include <iostream> 
using namespace std; 
class Example{ 
private:
    int i; 
public:
    Example(int n) { 
        i=n;
        cout<<"Constructing. "<<endl; 
    }
    ~Example() { 
        cout<<"Destructing. "<<endl; 
    }
    int get_i() { 
        return i; 
    } 
};
    int sqrt_it(Example o) { 
        return o.get_i()*o.get_i();
}
int main()
{
    Example x(10); 
    cout<<x. get_i()<<endl; 
    cout<<sqrt_it(x)<<endl; 
    return 0;
}
運行結(jié)果:
Distance:2.82843
Distance:2.82843
[Finished in 0.3s]
#include <iostream>
using namespace std; 
class Test{
public:
    Test() { 
        cout<<"Default constructor."<<endl; 
    } 
    Test(const Test& t){ 
        cout<<"Copy constructor!"<<endl; 
    }
};
void fun(Test p) {} 
int main(){
    Test a; 
    fun(a); 
    return 0;
}
運行結(jié)果:
Default constructor.
Copy constructor!
[Finished in 0.3s]
#include <iostream> 
using namespace std; 
class Dog{
public:
    static int number; 
    Dog(){
    number++;
    cout<<"New Dog"<<endl; 
}
    ~Dog(){ 
        number--;
        cout<<"A Dog Die"<<endl; 
    }
};
int Dog::number=0; 
int main(){
    Dog dog;
    Dog *pDog=new Dog(); 
    delete pDog;
    cout<<Dog::number<<endl; 
    return 0;
}
運行結(jié)果:
New Dog
New Dog
A Dog Die
1
A Dog Die
[Finished in 0.3s]
#include <iostream> 
using namespace std; 
class Test{
public:
    Test(int xx=1):x(xx){}
    void output()const{cout<<"x:"<<x<<endl;
} 
private:
    int x; 
};
int main()
{ 
    Test t;
    t.output(); 
    t=4; //盡量不要這么寫大溜!
    t.output(); 
    return 0;
}
運行結(jié)果:
x:1
x:4
[Finished in 0.3s]
#include <iostream> 
using namespace std; 
class Test{
public:
    Test(){
        cout<<"Default Constructor\n";
    }
    Test(int xx):x(xx){
        cout<<"Int Constructor\n";
    } 
    Test(const Test& t):x(t.x){//直接使用t的私有變量
        cout<<"Copy Constructor\n";
    }
private: 
    int x;
};
Test t;
int main(){
    cout<<"--------------------\n"; Test tt(t);
    return 0;
}
運行結(jié)果:
Default Constructor
--------------------
Copy Constructor
[Finished in 0.3s]
  1. 不標明private化漆,默認private?
#include <iostream> 
using namespace std; 
class Point {
    int x,y; 
public:
    Point(int x1=0, int y1=0):x(x1), y(y1) { 
        cout<<"Point:"<<x<<' '<<y<<'\n';
}
    ~Point() {
        cout<<"Point destructor!\n"; }
};
class Circle {
    Point center;//圓心位置
    int radius;//半徑 
//私有!
public:
    Circle(int cx,int cy, int r):center(cx,cy),radius(r) { 
        cout<<"Circle radius:"<<radius<<'\n';
    }
    ~Circle() {
        cout<<"Circle destructor!\n";
    } 
};
int main(){
    Circle c(3,4,5); 
    return 0;
}
運行結(jié)果:
Point:3 4
Circle radius:5
Circle destructor!
Point destructor!
[Finished in 0.3s]
#include <iostream> 
using namespace std; 
class Test{
public:
    Test(){ 
        cout<<"Hello: "<<++i<<endl; 
    }
    static int i; 
};
int Test::i=0; 
int main(){
    Test t[2];
    Test *p; 
    p=new Test[2]; 
    return 0;
}
運行結(jié)果:
Hello: 1
Hello: 2
Hello: 3
Hello: 4
[Finished in 0.3s]
#include <iostream> 
#include <string> 
using namespace std; 
class Person{ 
private:
    string name;
    int age; 
public:
    Person(string name,int age); 
    ~Person(){
        cout<<"Bye! My name is "<<name<<", I'm "<<age<<" years old."<<endl;
    }
    void growup(){ 
        age++; 
    }
};
Person::Person(string name, int age){
    this->name = name;
    this->age = age;
    cout<<"Hello,"<<name<<" is comming!"<<endl;
}
int main(){
    Person p("zhang",1); 
    for(int i=0;i<90;++i) 
        p.growup();
    return 0; 
}
運行結(jié)果:
Hello,zhang is comming!
Bye! My name is zhang, I'm 91 years old.
[Finished in 0.3s]
  1. 下面的程序無法通過編譯钦奋,分析原因并出修改辦法座云。
#include <iostream>
#include <vector> 
class Test{ 
private:
    int a; 
public:
    Test(const Test& t)=default; 
};
int main(){
    Test t;
    return 0; 
}

本來編譯器會給類默認添加一個Test(){},如果使用過了“default”付材,編譯器就不會再添加朦拖。把public下的Test(cosnt Test &t) = default注釋掉,或者在前添加Test(){}就可通過編譯伞租。

#include <iostream>
using namespace std;
class Test{
private:
    int a,b;
public:
    Test():Test(1){
        cout<<"Constructor without parameter!\n";
    }
    Test(int x):Test(x,10){
        cout<<"Constructor with 1 parameter!\n";
    }
    Test(int x,int y):a(x),b(y){
        cout<<"Constructor with 2 paramter!\n";
    }
    void output()const{
        cout<<a<<","<<b<<endl;
    }
};
int main(){
    Test t;
    t.output();
    Test t1(3,5);
    t1.output();
    return 0;
}
運行結(jié)果:
Constructor with 2 paramter!
Constructor with 1 parameter!
Constructor without parameter!
1,10
Constructor with 2 paramter!
3,5
Program ended with exit code: 0
#include <iostream>
using namespace std;
class Test{
private:
    int a;
public:
    Test(){
        cout<<"Default constructor!\n";
    }
    Test(int x):a(x){
        cout<<"Constructor!\n";
    }
    Test(const Test& t){
        a=t.a;
        cout<<"Copy constructor!\n";
    }
    Test(Test && t){
        a=t.a;
        cout<<"move copy constructor!\n";
    }
};
Test fun(){
    return Test(3);
}
int main(){
    Test t;
    Test t2=move(fun());
    return 0;
}
運行結(jié)果:
Default constructor!
Constructor!
move copy constructor!
Program ended with exit code: 0
#include <iostream>
#include <vector>
using namespace std;
class Element{
private:
    int a;
public:
    Element(int e=0):a(e){}
    Element(const Element& e):Element(e.a){
        cout<<"Copy constructor!\n";} Element(Element&& e):Element(e.a){cout<<"Move copy constructor!\n";
        }
};
int main(){
    vector<Element> vec;
    vec.reserve(10);
    vec.push_back(Element(3));
    Element e(5);
    vec.push_back(e);
    return 0;
}
運行結(jié)果:
Move copy constructor!
Copy constructor!
Program ended with exit code: 0
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末贞谓,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子葵诈,更是在濱河造成了極大的恐慌,老刑警劉巖祟同,帶你破解...
    沈念sama閱讀 223,002評論 6 519
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件作喘,死亡現(xiàn)場離奇詭異,居然都是意外死亡晕城,警方通過查閱死者的電腦和手機泞坦,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,357評論 3 400
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來砖顷,“玉大人贰锁,你說我怎么就攤上這事赃梧。” “怎么了豌熄?”我有些...
    開封第一講書人閱讀 169,787評論 0 365
  • 文/不壞的土叔 我叫張陵授嘀,是天一觀的道長。 經(jīng)常有香客問我锣险,道長蹄皱,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 60,237評論 1 300
  • 正文 為了忘掉前任芯肤,我火速辦了婚禮巷折,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘崖咨。我一直安慰自己锻拘,他們只是感情好,可當我...
    茶點故事閱讀 69,237評論 6 398
  • 文/花漫 我一把揭開白布击蹲。 她就那樣靜靜地躺著逊拍,像睡著了一般。 火紅的嫁衣襯著肌膚如雪际邻。 梳的紋絲不亂的頭發(fā)上芯丧,一...
    開封第一講書人閱讀 52,821評論 1 314
  • 那天,我揣著相機與錄音世曾,去河邊找鬼缨恒。 笑死,一個胖子當著我的面吹牛轮听,可吹牛的內(nèi)容都是我干的骗露。 我是一名探鬼主播,決...
    沈念sama閱讀 41,236評論 3 424
  • 文/蒼蘭香墨 我猛地睜開眼血巍,長吁一口氣:“原來是場噩夢啊……” “哼萧锉!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起述寡,我...
    開封第一講書人閱讀 40,196評論 0 277
  • 序言:老撾萬榮一對情侶失蹤柿隙,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后鲫凶,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體禀崖,經(jīng)...
    沈念sama閱讀 46,716評論 1 320
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,794評論 3 343
  • 正文 我和宋清朗相戀三年螟炫,在試婚紗的時候發(fā)現(xiàn)自己被綠了波附。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 40,928評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖掸屡,靈堂內(nèi)的尸體忽然破棺而出封寞,到底是詐尸還是另有隱情,我是刑警寧澤仅财,帶...
    沈念sama閱讀 36,583評論 5 351
  • 正文 年R本政府宣布狈究,位于F島的核電站,受9級特大地震影響满着,放射性物質(zhì)發(fā)生泄漏谦炒。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 42,264評論 3 336
  • 文/蒙蒙 一风喇、第九天 我趴在偏房一處隱蔽的房頂上張望宁改。 院中可真熱鬧,春花似錦魂莫、人聲如沸还蹲。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,755評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽谜喊。三九已至,卻和暖如春倦始,著一層夾襖步出監(jiān)牢的瞬間斗遏,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,869評論 1 274
  • 我被黑心中介騙來泰國打工鞋邑, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留诵次,地道東北人。 一個月前我還...
    沈念sama閱讀 49,378評論 3 379
  • 正文 我出身青樓枚碗,卻偏偏與公主長得像逾一,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子肮雨,可洞房花燭夜當晚...
    茶點故事閱讀 45,937評論 2 361

推薦閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理遵堵,服務發(fā)現(xiàn),斷路器怨规,智...
    卡卡羅2017閱讀 134,720評論 18 139
  • 原文出處:南峰子的技術(shù)博客 Objective-C語言是一門動態(tài)語言陌宿,它將很多靜態(tài)語言在編譯和鏈接時期做的事放到了...
    _燴面_閱讀 1,235評論 1 5
  • Objective-C語言是一門動態(tài)語言,他將很多靜態(tài)語言在編譯和鏈接時期做的事情放到了運行時來處理椅亚。這種動態(tài)語言...
    tigger丨閱讀 1,408評論 0 8
  • 傍晚限番,隔壁的大爺大媽突然爭執(zhí)起來,起因是一只八哥呀舔。大媽把八哥放了,但是把八哥的翅膀弄傷了,八哥飛不起來媚赖,大爺去幫八...
    孤燭琉璃閱讀 270評論 0 0
  • 低調(diào)做人惧磺。高調(diào)做事颖对。 表現(xiàn)自己 夢在遠方,路在腳下磨隘。 隊長李一鳴寄語...
    遇見久伴閱讀 312評論 0 0