摘要:
#include struct _finddata_t propty_file; intptr_t hFile = NULL ; hFile = _findfirst(pdir,&propty_file) ; if( -1L == hFile) { cout<< "search dir failed \n" << endl; return false; } do { ... 阅读全文
摘要:
#include using namespace std; class Internet { public: Internet(char *name,char *address) { cout<<"载入构造函数"<<endl; strcpy(Internet::name,name); ... 阅读全文
摘要:
IP Header Format : RFC 791 The IP header structure is as follows: 4 8 16 ... 阅读全文
摘要:
1.文件的查找 当对一个文件操作时,如果不知道该文件是否存在,就要首先进行查找。MFC中有一个专门用来进行文件查找的类CFileFind,使用它可以方便快捷地进行文件的查找。下面这段代码演示了这个类的最基本使用方法。 CString strFileTitle; CFileFind finder; BOOL bWorking = finder.FindFile("C:\\window... 阅读全文
摘要:
#include #include #include /* 取子串的函数 */ static char* substr(const char*str,unsigned start, unsigned end) { unsigned n = end - start; static char stbuf[256]; strncpy(stbuf, str + start, n); stbuf[n]... 阅读全文
摘要:
int Alen,Blen; memset(c,0,sizeof(c)); Alen=strlen(a); Blen=strlen(b); c[0]=t; strcat(c,"|"); strcat(c,a) ; strcat(c,"|") ;此行以下错误 阅读全文
摘要:
/// /// 数据流转换为十六进制字符串 /// /// /// private static string ByteArrayToHexString(byte[] bytes) { if ( bytes == null || bytes.Length == 0 ) throw new ArgumentException( "bytes [] 参数出错" )... 阅读全文
摘要:
VC++下使用ADO编写数据库程序 准备: (1)、引入ADO类 #import "c:\program files\common files\system\ado\msado15.dll" \ no_namespace \ rename ("EOF", "adoEOF") (2)、初始化COM 在MFC中可以用AfxOleInit()... 阅读全文
摘要:
说明:本文纯粹是总结一下有关类型转换的贴子, 本人并未对所有方法都做测试,仅仅是为了给大家一个参考。 读者层次:初学 int i = 100;long l = 2001;float f=300.2;double d=12345.119;char username[]="程佩君";char temp[200];char *buf;CString str;_variant_t v1;_bstr_t v... 阅读全文
摘要:
Windows Socket 简介===============================这篇文章出自bugfree/CSDN平台: VC6 Windows XP 简介:------- Windows 的Socket函数有许多, 我没有做详细介绍, 这里的函数都是简要说明其用途, 详细用法请参考MSDN. 这里的主要目的是为了后面的三个应用服务. 函数说明:--------- WSA... 阅读全文
摘要:
姓名: 地址: 性别: 昵称: ... 阅读全文