03 2009 档案
摘要:// 要求算一任意长度字符串中不同的字符以及它的个数。
//c#3.0
/***************第一种方法**********************/
var values = "abcdefgabc"
.GroupBy(c => c)
.Select(g => String.Format("{0}, {1}", g.Key, g.Count()))
.ToArray();
Array.ForEach(values, Console.WriteLine);
/***************第二种方法**********************/
"abcdefgabc"
.GroupBy(c => c).ToList()
.ForEach(g => Console.WriteLine(g.Key + ",
阅读全文
摘要:Good Programming Practice
1,Read the manuals for the version of C++ you are using.
Refer to these manuals frequently to be sure you are aware of the rich collections of C++ features and that you are using them correctly.
2,Your computer and compiler are good teachers.
If after reading your C++ language manuals ,
you still are not sure how a feature of C++ works,
experiment using a small "test program" and see what happens.
Set your complier options for "maximum warnings".
St
阅读全文

浙公网安备 33010602011771号