摘要: Stand for what you believe in, even if others tend to disagree. 阅读全文
posted @ 2012-07-23 18:24 Jawn 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Some good friends become distant insensibly,even you do not know why. 阅读全文
posted @ 2012-07-23 17:40 Jawn 阅读(298) 评论(1) 推荐(0) 编辑
摘要: Wake up everyday stronger than yesterday, face your fear and wipe your tears. 阅读全文
posted @ 2012-07-23 17:07 Jawn 阅读(174) 评论(0) 推荐(0) 编辑
摘要: When you want to succeed as bad as you want to breathe, you’ll be successful. 阅读全文
posted @ 2012-07-23 16:13 Jawn 阅读(73) 评论(0) 推荐(0) 编辑
摘要: CString 里的一些函数与VB里字符串处理的函数很多都是类似的。1.CString::IsEmptyBOOL IsEmpty( ) const;返回值:如果CString 对象的长度为0,则返回非零值;否则返回0。说明:此成员函数用来测试一个CString 对象是否是空的。示例:下面的例子说明了如何使用CString::IsEmpty。// CString::IsEmpty 示例CString s;ASSERT( s.IsEmpty() );请参阅 CString::GetLength2.CString::LeftCString Left( int nCount ) const;throw 阅读全文
posted @ 2012-06-09 19:43 Jawn 阅读(2225) 评论(0) 推荐(0) 编辑
摘要: strcspn 原型:extern int strcspn(char *s1,char *s2); 用法:#include <string.h> 功能:在字符串s1中搜寻s2中所出现的字符的位置。 说明:返回s2所含的字符在s1中第一次出现的位置,亦即第一个在s1中出现而s2中没有出现的字符组成的子串的长度。 举例: // strcspn.c #include <syslib.h> #include <string.h> main() { char *s="Golden Global View"; char *r="new&qu 阅读全文
posted @ 2012-06-09 19:39 Jawn 阅读(854) 评论(0) 推荐(0) 编辑
摘要: char* stpcpy(char *dest,const char *src) 将字符串src复制到destchar* strcat(char *dest,const char *src) 将字符串src添加到dest末尾 char* strchr(const char *s,int c) 检索并返回c在s中第一次出现的位置的指针,没有则返回NULL int strcmp(const char *s1,const char *s2) 比较字符串s1与s2的大小,并返回s1-s2 char* strcpy(char *dest,const char *src) 将字符串src复制到dest s 阅读全文
posted @ 2012-06-09 19:38 Jawn 阅读(234) 评论(0) 推荐(0) 编辑
摘要: strnicmp 函数名: strnicmp 功 能: 比较字符串str1和str2的前n个字符串字典序的大小,但是不区分字母大小写。 比较是这样进行的,先比较2个字符串的第1个字符字典序的大小,如果能比较出大小,则马上返回了,如果不能区别大小,开始比较第2个,如果这时第1个字符串已经到尽头了,第2个字符串还有字符,这时算第2个字符串大。例: char *str1="B"; char *str2="abcD"; int n=4; strnicmp(char *str1, char *str2, 4); 结果是str1大,因为B在a的后面。 char *s 阅读全文
posted @ 2012-06-09 19:33 Jawn 阅读(1904) 评论(0) 推荐(1) 编辑
摘要: strncpy char * strncpy(char *s1,char *s2,size_t n); 将字符串s2中最多n个字符复制到字符数组s1中,返回指向s1的指针。 注意:如果源串长度大于n,则strncpy不复制最后的'\0'结束符,所以是不安全的,复制完后需要手动添加字符串的结束符才行。 Strcpy和Strncpy的区别- - 第一种情况: char* p="how are you ?"; char name[20]="ABCDEFGHIJKLMNOPQRS"; strcpy(name,p); //name改变为" 阅读全文
posted @ 2012-06-09 19:32 Jawn 阅读(2064) 评论(0) 推荐(1) 编辑
摘要: 在.h头文件加入#ifndef ULONG_PTR #define ULONG_PTR unsigned long*#endif #include <comdef.h> #include "gdiplus.h" using namespace Gdiplus;#pragma comment(lib, "GdiPlus.lib") 在.cpp文件加入全局变量GdiplusStartupInput m_gdiplusStartupInput;ULONG_PTR m_pGdiToken;在初始化函数中加入GdiplusStartup(&m_ 阅读全文
posted @ 2012-06-09 19:30 Jawn 阅读(183) 评论(0) 推荐(0) 编辑