上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: Creating a Security Descriptor for a New Object in C++The following example creates a security descriptor for a new registry key using the following process. Similar code can be used to create a security descriptor for other object types.The example fills an array of EXPLICIT_ACCESS structures with 阅读全文
posted @ 2011-10-26 16:22 韩冬冬 阅读(908) 评论(0) 推荐(0) 编辑
摘要: 注:这两个函数都是将字符串写到内存数组中char szA[100]; //An ANSI string bufferWCHAR szW[100]; //A Unicode string buffer//Normal sprintf:all strings are ANSIsprintf(szA, "%s","ANSI Str");//Converts Unicode string to ANSIsprintf(szA,"%S",L"Unicode Str");//Normal swprintf:all string 阅读全文
posted @ 2011-10-26 14:15 韩冬冬 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 拿vc6.0来说:1、首先创建一个简单的win32 Application。2、设置工程预定义了UNICODE而没有预定义_UNICODE(工程->设置->预定义栏添加UNICODE)3、在WinMain主函数所在CPP文件包含<TChar.h>4、当在WinMain里添加 TChAR str[6] = "123"时,TCHAR被解析为unsigned short类型,当调用函数_tcscpy时,参数被解析为char类型5、修改工程预定义_UNICODE而没有预定义UNICODE,当在WinMain里添加 TChAR str[6] = "1 阅读全文
posted @ 2011-10-26 12:03 韩冬冬 阅读(549) 评论(0) 推荐(0) 编辑
摘要: class First{public: int num = 0;//错误 const int num1 = 0;//错误 static int num2 = 0;//错误 static const int num3 = 0;//正确,只有静态常量整型数据成员才可以在类中初始化 string str = "0";//错误 const string str1 = "0";//错误 static string str2 = "0";//错误 static const string str3 = "0";//错误 floa 阅读全文
posted @ 2011-10-25 13:57 韩冬冬 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Animal为基类,Bird为派生类Bird继承Animal当继承方式为public时父类的public成员在子类也是public父类的protected成员在子类也是protected父类的private成员只属于父类当继承方式为protected时父类的public成员在子类是protected成员父类的protected成员在子类也是protected父类的private成员只属于父类当继承方式为private时父类的public成员在子类是private成员父类的protected成员在子类是private成员父类的private成员只属于父类 阅读全文
posted @ 2011-10-25 13:56 韩冬冬 阅读(176) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页