上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 161 下一页
摘要: // pb.cpp : Defines the initialization routines for the DLL.//#include "stdafx.h"#include <string.h>#include "pb.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif////Note!////If this DLL is dynamically linked against the MFC//DLLs 阅读全文
posted @ 2012-11-23 16:29 郑文亮 阅读(413) 评论(0) 推荐(0)
摘要: 最近在C++编程中经常遇到需要多字节字符与宽字节字符相互转换的问题,一直自己贴那几句代码。觉得麻烦,于是就自己写了一个类来封装wchar_t与char类型间的转换,其他的,诸如:CString\ LPWSTR\TCHAR CHAR\LPSTR之间也是一样用#include <iostream> using namespace std; class CUser { public: CUser(); virtual~ CUser(); char* WcharToChar(wchar_t* wc);//宽字节转单字节 wchar_t* CharToWchar(char* c); //单字 阅读全文
posted @ 2012-11-23 13:32 郑文亮 阅读(20790) 评论(1) 推荐(1)
摘要: C语言原本是在英文环境中设计的,主要的字符集是7位的ASCII码,8位的byte(字节)是最常见的字符编码单位。但是国际化软件必须能够表示不同的字符,而这些字符数量庞大,无法使用一个字节编码。 C95标准化了两种表示大型字符集的方法:宽字符(wide character,该字符集内每个字符使用相同的位长)以及多字节字符(multibyte character,每个字符可以是一到多个字节不等,而某个字节序列的字符值由字符串或流(stream)所在的环境背景决定)。 自从1994年的增补之后,C语言不只提供char类型,还提供wchar_t类型(宽字符),此类型定义在stddef.h 头文件... 阅读全文
posted @ 2012-11-23 13:22 郑文亮 阅读(4189) 评论(0) 推荐(0)
摘要: 作者:朱金灿来源:http://blog.csdn.net/clever101 以前看《Window核心编程》,感觉多字节和宽字节之间还比较麻烦的,至少MultiByteToWideChar函数和WideCharToMultiByte函数有足够多的参数的意义让我们去理解。近日接触了ATL的一个很好的字符串的转换宏:A2W和W2A。用法很简单,A2W的用法:[cpp] view plaincopyprint?#include<atlconv.h> DoSomething(LPWSTRstr);//函数声明 USES_CONVERSION;DoSomething(A2W("S 阅读全文
posted @ 2012-11-23 11:34 郑文亮 阅读(473) 评论(0) 推荐(0)
摘要: </head><form method="post" action="the URL of POST" ><p> <textarea cols="80" rows="20"></textarea></p><p> <input type="submit" value="Submit"><input type="reset" value="Reset 阅读全文
posted @ 2012-11-22 21:44 郑文亮 阅读(4036) 评论(0) 推荐(0)
摘要: 一.CFile类操作文件默认的是Binary模式,CStdioFile类操作文件默认的是Text模式。在Binary模式下我们必须输入'\r\n',才能起到回车换行的效果,'\r'只是回车(回到当前行的第一列),'\n'只是换行(到达下一行的当前列)。而在Text模式下'\r'的工作是自动完成的,当我们写一个'\n'的时候,系统会自动帮我们在其前面加上一个'\r',然后保存到文件里。另外,CFile::typeText只能在CFile的子类中使用,CFile自身的Read函数不能使用CFile::t 阅读全文
posted @ 2012-11-22 21:21 郑文亮 阅读(552) 评论(0) 推荐(0)
摘要: 有三分代码strCoding.hstrCoding.cpptest.cpp*******************************************************************************************************************************[cpp] view plaincopyprint?//这是个类strCoding(strCoding.h文件) #pragmaonce #include<iostream> #include<string> #include<windows 阅读全文
posted @ 2012-11-22 21:17 郑文亮 阅读(1290) 评论(0) 推荐(0)
摘要: 参考网址:http://www.398588.com/Article/T9/78.aspx读取网页的内容可以类比本地的文件一下,代码如下:#include <afxinet.h> CStringurl;GetDlgItemText(IDC_EDIT1,url);CInternetSessionSess;CHttpFile*cFile=(CHttpFile*)Sess.OpenURL(url,1,INTERNET_FLAG_TRANSFER_ASCII||INTERNET_FLAG_RELOAD,NULL,0);DWORDdwStatusCode;cFile->QueryInf 阅读全文
posted @ 2012-11-22 21:14 郑文亮 阅读(1600) 评论(0) 推荐(0)
摘要: assert函数名: assert功 能: 测试一个条件并可能使程序终止用 法: void assert(int test);程序例:#include#include#includestruct ITEM {int key;int value;};/* add item to list, make sure list is not null */void additem(struct ITEM *itemptr) {assert(itemptr != NULL);/* add item to list */}int main(void){additem(NULL);return 0;}asse 阅读全文
posted @ 2012-11-22 21:02 郑文亮 阅读(15027) 评论(0) 推荐(0)
摘要: 版权所有 2009-2012 武汉命运科技有限公司保留所有权利官方网站:http://www.ncmem.com/产品首页:http://www.ncmem.com/webplug/http-uploader3/index.aspx在线演示:http://www.ncmem.com/products/http-uploader3/demo/index.html产品介绍:http://www.cnblogs.com/xproer/archive/2012/02/17/2355440.html开发文档-ASP:http://www.cnblogs.com/xproer/archive/2012/0 阅读全文
posted @ 2012-11-22 17:23 郑文亮 阅读(3505) 评论(0) 推荐(0)
上一页 1 ··· 75 76 77 78 79 80 81 82 83 ··· 161 下一页