Shadow Chasm
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OwnWaterloo @ 2006-09-22 14:24

  • iostream
     istream cin
     ostream cout cerr clog
    上述4个对象都是对窗口输入输出 若要对文件输入输出可以在运行程序时重定向

 

  • cout << ""; 是一个表达式 结果仍为cout
    所以
    cout <<""<<endl;
    等同于
    (cout <<"")<<endl;
    等同于
    cout <<""; cout<<endl;

 

  • 在 while (cin >> value) 中
    当 cin 对象作为测试条件时
    如果流是有效的 (读入下一个输入是可能的 )  测试成功 条件为true
    如果流是无效的 (遇到end-of-file 或者类型不符合) 测试失败 条件为false

  • end-of-file
    Windows中常用 ctrl+z
    Unix Mac OS-X 中 常用 ctrl+d

  • cout <<"a multi-line "
     <<"string literal "
     <<"using concattenation"
     <<endl;
    将会输出 a multi-line string littral using concattenation(\n)

  • A '\' before a "newline" ignores the line break
    std::cou\
    t<<"Hi"<<st\
    d::endl;
    等效于
    std::cout<<"Hi"<<std::endl;
    std::cout <<"a multi-line \
    string literal using a back slash"
      <<std::endl;
    等效于
    std::cout <<"a multi-line string literal using a back slash"<<std::endl;

  • extern int i;//declares but does not define i
    int i;//declares and defines i
    extern int i=1//definition

  • string s1;//a empty string
    string s2(s1);
    string s3("value");// {fckeditor}??
    string s4(n,'c');

  • string s;
    cin >> s; //read whitespace-separated string to s
    getline(cin,s);

  • bool s.empty();
    string::size_type s.size();
    s[n];
    s1+s2;
    s1=s2;
    v1==v2; != < <= > >=


 
OwnWaterloo @ 2006-09-21 17:51

  • 01 Aries
    n.
    白羊座, 白羊宫
    A constellation in the Northern Hemisphere near Taurus and Pisces.
    白羊座:位于北半球靠近金牛星座和双鱼星座的一个星座
    The first sign of the zodiac in astrology.
    占星学中第一官
    One who is born under this sign.Also called Ram
    出生于这个时段的人也作 Ram

 

  • 02 Taurus
    n.
    金牛座, (占星术中)金牛宫
    A constellation in the Northern Hemisphere near Orion and Aries.
    金牛座:在北半球中靠近猎户座和白羊座的星座
    The second sign of the zodiac.
    金牛宫:黄道十二宫的第二宫
    One who is born under this sign.Also called Bull
    出生于金牛宫时段的人也作 Bull

 

  • 03 Gemini
    n.
    双子宫,双子(星)座
    A constellation in the Northern Hemisphere containing the stars Castor and Pollux.Also called Twins
    双子星座:北半球的一个星座,包括北河二和北河三也作 Twins
    The third sign of the zodiac in astrology.Also called Twins
    双子宫:天文学上的黄道第三宫也作 Twins
    One who is born under this sign.
    双子宫出生的人

 

  • 04 Cancer
    A constellation in the Northern Hemisphere near Leo and Gemini.
    巨蟹星座:北半球狮子座和双子座附近的一个星座
    The fourth sign of the zodiac in astrology.
    世蟹宫:占星术中黄道的第四宫
    One who is born under this sign.Also called Crab
    出生于巨蟹宫时段的人也作 Crab

 

  • 05 Leo
    n.
    狮子(用于儿童故事寓言等), [天文]狮子座
    A constellation in the Northern Hemisphere near Cancer and Virgo, containing the bright stars Regulus and Denebola.
    狮子(星)座:北半球的一个星座,位于巨蟹座和处女座附近,包括两颗明亮的星:轩辕十四和天津四
    The fifth sign of the zodiac in astrology.
    (占星术中的)狮子宫:在占星术中黄道十二宫的第五宫
    One who is born under this sign.Also called Lion
    出生于狮子宫时段的人也作 Lion

 

  • 06 Virgo
    A constellation in the region of the celestial equator between Leo and Libra.Also called Virgin
    室女星座:在狮子座和天秤座之间赤道区的一个星座也作 Virgin
    The sixth sign of the zodiac in astrology.Also called Virgin
    室女宫:天文学上的黄首宫的第六宫也作 Virgin
    pl. Vir.gosOne who is born under this sign.
    【复数】 Vir.gos在这一宫出生的人

 

  • 07 Libra
    [拉][天]天秤座
     天秤宫
    A constellation in the Southern Hemisphere near Scorpius and Virgo.Also called Balance, Scales
    天秤星座:南半天球的一个星座,靠近天蝎座和处女座也作 Balance, Scales
    The seventh sign of the zodiac in astrology.Also called Balance, Scales
    天秤宫:天文学中黄道上的第七宫也作 Balance, Scales
    One who is born under this sign.
    出生于天秤宫时段的人

 

  • 08 scorpio
    n.
    [天]天蝎座
    n.
    天蝎宫,天蝎(星)座
    The eighth sign of the zodiac in astrology.
    天蝎座:黄道十二宫的第八宫
    One who is born under this sign.
    出生于天蝎座的人

 

  • 12 Pisces
    双鱼宫,双鱼(星)座
    A constellation in the equatorial region of the Northern Hemisphere near Aries and Pegasus.Also called Fishes
    双鱼星座:北半天球赤道地带上空星云,靠近白羊星座与飞马座也作 Fishes
    The 12th sign of the zodiac in astrology.Also called Fishes
    双鱼宫:黄道占星术中十二宫中的第十二宫也作 Fishes
    One who is born under this sign.
    双鱼宫的人:一个生在双鱼座时段的人

 



 
OwnWaterloo @ 2006-09-21 15:57

指针的2种声明

int *pi;
int* pi;

Both are correct

但是对多个同一类型的指针变量 就有区别

int *pi1.*pi2;//ok pi1 and pi2 can point to an int
int* pi1,pi2;//error: pi1 is a point to int but pi2 is a int

int* pi1;
int* pi2;//ok

而且第1种方法更加灵活

int i1,*pi1,i2,*pi2,i3;



 
OwnWaterloo @ 2006-08-24 03:02

原谅我吧 BirdSong Halley
原谅我吧 爸爸 妈妈
原谅我吧 所有关心我 爱我 而又因我感到失望的朋友亲戚们


----------------


翻看咖喱的BLOG  是一篇关于 同济第三届程序设计竞赛初赛的日记
曾经我也看过的 但也许是我料到你会把那天记入BLOG 所以第1时间就看了正文 以后没去翻过 所以错过了一段很精彩的评论
以下是评论的引文(略去很大一部分)

 

birdsong @ 2006-04-16 14:53 电邮: b4die@msn.com

其实我出的三个题目都是考虑了很久的,……决赛中再加油吧:D


PS:你得提醒提醒Ow同学,这状态,我很失望。


Halley.G @ 2006-04-16 22:24

注意到没有算法这件事情了……决赛会加油的。

PS: 他的状态,我比你估计更失望……


----------------


我震惊
我不知道呆掉了多久
我甚至有很长一会儿已经停止了呼吸
我觉得我回过神来是因为我快憋坏了而吸了还是呼了一口气

感谢BirdSong 感谢Halley
粗心的我 乞求你们原谅
我迟到了1个多季度 才发现这段我会一辈子记着的评论 发现你们对我的爱和期待

曾经有一份真诚的劝告放在我面前 我没有珍惜 等我失去后才后悔莫及 人世间最痛苦的事莫过于此
如果一定要选出一个最受失望的人 我会对你们说三个字:那是我  如果非要在这份失望上加上一个期限 我肯定它为期不远了


也许你们已经失望透顶 也许你们还残留了一点点希望 都没有关系
过去的就让它成为过去吧
我不是喜欢说大话的人 其他的我不想多说 只有一句
所有在我身上的失望 真的是为期不远了


我说过 不是因为寝室那帮子 我肯定休学好好玩够了再来
我对你们这样说
我对以前的同学也这样说
不管对谁 我提到你们 我都会这样说  除了父母  我怕他们担心
我没有看错
我感激你们  你们真是我的好兄弟(包括小军哦~ 我知道你肯定也和他们想一样的 只是没有说出来)
还感激所有所有关心我 爱我 而又因我感到失望的朋友亲戚们

谢谢 ^_^



 
OwnWaterloo @ 2006-08-24 01:37

因为2点 我不得不佩服你

在各种诱惑下 能把持得住 坚决抵制 不误入歧途
在过了一段奢侈的日子 而后决定离开这种日子之后 能重新安于平静的生活

能做到以上的女孩不多
能做到以上的漂亮女孩更少
能做到以上的漂亮又有才气的女孩更加少

你是我的骄傲
加油沛沛~~



 
分类
· 所有网志 (22)
· 随便乱涂 (10)
· Fresher Year B (8)
· For English (1)
· Data (1)
· 2006 (2)
链接
· 我的歪酷 非非共享界
最新评论
站内搜索
订阅 RSS
0003457
歪酷博客