C++????????????
???????????? ???????[ 2013/4/25 10:42:22 ] ????????
????8????????????
//????cmpFcn????????????????????????
Typedef bool (*cmpFcn)(const string&??const string&);
//?? ????????????????????
//?? ???ú???????????磺
//?????????
bool lengthCompare(const String&??const String&);
cmpFcn pf=lengthcompare;
lengthCompare(“hi”??”bye”);//????????????
pf(“hi”??”bye”);//??????????
(*pf) (“hi”??”bye”);//?????????????
//????????????βΣ?
void useBigger(bool(const String&??const String&));
void useBigger(bool(*)(const String&??const String&));
???????IO??
????1??IO??????????????????????????????????????vector?????С??βλ??????????????????????????IO??????????????á???????????const??????
??????
????1??const???????????????????????????????const??????????????????????У?????????????????г???????????????????
????2???????const????????????????????????????const?????????*this??????const???á?
????3????????inline?????????????????????дinline???????????дinline????????????????
????4???????????????????????????????磺class A;?????????????????????????????????????????????????????á????????????????class A{ public:A *next;};????C???????????????????????
????5??????????????????????A temp;??????class A temp;??????????C????????????
????6??const??????????const???????const??????????????????
????7??Mutable????????????????????????const????????????????????????mutable??????const?????????????ó????????????
????8??????????βα??????崦???????????У??????????????????????????????????????????????????????????????????У????βα???????????????????????????????檔???????????????????????????????????????????????????????????????????????????????????????????????????βα?????????嶼???????????????Щ??????????????ж??壬?????????????????????????磺
class Screen{
public:
Typedef std::string::size_type index;
Index get_cursor() const;
private:
Int cursor;
};
Inline Screen::index Screen::get_cursor()const{
return cursor;
}
????9?????????????????????????????????????????塣???????????????const????????????????壬??????????????????????????и?????
????10?????????????ó?????б?????????????г???????????????????????????????????????????????????????????????????????????????????????????????????????????????:???????Σ?????????Ρ?????????????????????е??????ɡ???????????????????????????б??????????????????????????????????????ν??г??????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11