2010年10月19日
摘要: namespace std{ //exception派生 class logic_error; //逻辑错误,在程序运行前可以检测出来 //logic_error派生 class domain_error; //违反了前置条件 class invalid_argument; //指出函数的一个无效参数 class length_error; //指出有一个超过类型size_t的最大可表现值长度... 阅读全文
posted @ 2010-10-19 09:34 云中君 阅读(4267) 评论(0) 推荐(0) 编辑
  2010年9月30日
摘要: 非修改性序列操作(12个)类型函数名说明循环for_each()对序列中的每个元素执行某操作。查找find()在序列中找出某个值的第一次出现的位置。find_if()在序列中找出符合某谓词的第一个元素。find_end()在序列中找出一子序列的最后一次出现的位置。find_first_of()在序列中找出第一次出现指定值集中之值的位置。adjacent_find()在序列中找出相邻的一对值。计数c... 阅读全文
posted @ 2010-09-30 13:32 云中君 阅读(2925) 评论(0) 推荐(0) 编辑
  2010年9月21日
摘要: #include <iostream>#include <windows.h>using namespace std;int main(){char sz[] = "aBcDefGHIJklmn";cout << sz << endl;::CharLowerA(sz);cout << sz << endl;::CharUppe... 阅读全文
posted @ 2010-09-21 22:01 云中君 阅读(2807) 评论(0) 推荐(0) 编辑
  2010年9月17日
摘要: // 各种字符串类型之间的转换#include <atlbase.h>#include <iostream>using namespace std;int main(){// UNICODE 到 MBCS(多字节字符集){LPOLESTR lpw = L"Hello,你好";size_t wLen = wcslen(lpw) + 1;int aLen = ::WideCha... 阅读全文
posted @ 2010-09-17 14:24 云中君 阅读(5671) 评论(0) 推荐(0) 编辑
  2009年6月12日
摘要: Delphi中有一个线程类TThread是用来实现多线程编程的,这个绝大多数Delphi书藉都有说到,但基本上都是对TThread类的几个成员作一简单介绍,再说明一下Execute的实现和Synchronize的用法就完了。然而这并不是多线程编程的全部,我写此文的目的在于对此作一个补充。线程本质上是进程中一段并发运行的代码。一个进程至少有一个线程,即所谓的主线程。同时还可以有多个子线程。当一个进程... 阅读全文
posted @ 2009-06-12 17:33 云中君 阅读(474) 评论(0) 推荐(0) 编辑
  2009年6月4日
摘要: 现有 Delphi 项目迁移到 Tiburon 中的注意事项 随着 Embarcadero 8 月 25 号发布 RAD Studio 2009 (Tiburon) 以来(Tiburon 的 RTM 日期可能要延后到 9 - 10 月),随着 Tiburon 全面支持 Unicode,现有的 Delphi / C++ Builder 项目要迁移到 Unicode 下应该注意些什么也成为大家最为关心... 阅读全文
posted @ 2009-06-04 23:24 云中君 阅读(1332) 评论(0) 推荐(0) 编辑
  2009年1月15日
摘要: function ErgodicXML(ANode: IXMLNode): string;var i: Integer; Name, Value: string;begin Result := ''; if ANode.NodeType = ntText then exit; { 如果是ntText节点则返回 } Result := ''; if ANode.IsTextElem... 阅读全文
posted @ 2009-01-15 18:05 云中君 阅读(699) 评论(0) 推荐(0) 编辑
  2009年1月8日
摘要: TTreeNode 需要了解的属性: AbsoluteIndex property AbsoluteIndex: Integer; Use AbsoluteIndex to determine absolute position of a node in a tree nodes object. The first tree node in a tree nodes objec... 阅读全文
posted @ 2009-01-08 16:48 云中君 阅读(2473) 评论(0) 推荐(0) 编辑
摘要: 需要了解的属性: Count property Count: Integer; Use Count to determine the number of tree nodes in the tree view that owns the tree nodes object. Count provides an upper bound when iterating through t... 阅读全文
posted @ 2009-01-08 14:53 云中君 阅读(993) 评论(0) 推荐(0) 编辑
摘要: 需要了解的属性: AutoExpand property AutoExpand: Boolean; Set AutoExpand to true to cause the selected item to expand and the unselected items to collapse. BorderStyle property BorderStyle: TBor... 阅读全文
posted @ 2009-01-08 13:27 云中君 阅读(1679) 评论(1) 推荐(0) 编辑