1.4.1 while 语句 C++中的while语句的结构依然是 :while(condition){ while_body_statement } . 和 C#,Java相比.C++中的while语句中的条件(condition) 值非0则为真。意思是 -1 负值同样为真 ,只要 不是0都为真. 而C#和Java中的条件只能是boolean值.所以以下为死循环: while(-1 || 1){ std::cout << "printf" << std::endl; } PS : 突然想到如果条件不是... Read More
posted @ 2011-10-11 15:40 liheping Views(356) Comments(1) Diggs(0) Edit
关键词 : cin (读 see-in) --> 标准输入 Console.ReadLine();System.in.read(); cout (读 see-out) --> 标准输出Console.WriteLine();System.out.println(); cerr (读 see-err) -- 标准错误 Console.Error.WriteLine();System.err.println(); clog (读 see-log) --> 产生程序执行的一般信息(打印日志) << 输出操作符 endl 操纵符... Read More
posted @ 2011-10-11 13:49 liheping Views(240) Comments(0) Diggs(0) Edit