- 博客(38)
- 资源 (2)
- 收藏
- 关注
原创 strstr ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* 得到s1中第一次包含s2字符串的位置指针。*/#include char * my_strstr(const char *s1,const char *s2){ if (*s1 == 0) { if (*s2) return (char
2006-11-25 22:26:00 5485 3
原创 strpbrk ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* 得到s1中第一个且是s2中字符的位置指针。*/#include char * my_strpbrk(const char *s1 ,const char *s2){ const char *c = s2; if (!*s1) return (char *)
2006-11-25 21:53:00 2401 4
原创 strcspn ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* 得到s1中第一个且是s2中字符的字符位置。*/int my_strcspn(const char *s1 ,const char *s2){ const char *s = s1; const char *p; while (*s1) { fo
2006-11-25 21:24:00 1601
原创 strspn ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* 得到s1中第一个且不是s2中任意字符的字符位置。*/int my_strspn(const char *s1 ,const char *s2){ const char *s = s1; const char *p; while (*s1) {
2006-11-25 21:15:00 1783
原创 strrev ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Reverses the order of characters in the string. The terminating null character remains in place. 把字符串的所有字符的顺序颠倒过来(不包括空字符NULL)。 返回指向颠倒顺序后的字符
2006-11-25 19:03:00 3556
原创 strnset ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Sets the first count characters of string the character value.If the length of string is less than count, the length of string is used in place of n.
2006-11-25 17:59:00 2044 1
原创 strset ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Sets all of characters in string (except the terminating /0character) equal to val. 把字符串的所有字符都设置为字符val。*/char * my_strset(char *str,int val)
2006-11-25 17:52:00 1441
原创 strupr ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Force string to lower case。 将字符串转换为大写。只改变字符串中出现的小写字母,不改变其他字符。*/char * my_strupr(char *str){ char *p = str; while (*p != /0) {
2006-11-25 17:44:00 3413 1
原创 strlwr ( ) 【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Force string to lower case。 将字符串转换为小写。只改变字符串中出现的大写字母,不改变其他字符。*/char * my_strlwr(char *str){ char *p = str; while (*p != /0) {
2006-11-25 17:38:00 3100 1
原创 strdup ( ) 【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Allocates enough storage via malloc() for a copy of the string, copies the string into the new memory, and returns a pointer to it. 复制字符串,返回指向被复制字符
2006-11-25 17:26:00 3105
原创 strrchr ( ) 【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Finds the last occurrence of ch in string. The terminating null character is used as part of the search. 查找在字符串中最后一次出现字符’ch’的位置。如果str中存在字符ch,返回出现c
2006-11-25 16:12:00 2925
原创 strchr ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】#include /* Searches a string for a given character, which may be the null character /0. 查找字符串string中首次出现字符ch的位置。如果string中存在字符ch,返回首次出现ch的位置的指针;否
2006-11-25 15:59:00 3570
原创 memset ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Sets the first "count" bytes of the memory starting at "dst" to the character value "val". 把dst所指内存区域的前count个字节设置为val。返回指向dst的指针。 在实际应用中,我们有时候会
2006-11-25 15:39:00 3577
原创 memicmp ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* memicmp perform a case-insensitive memory comparision.For differences,upper case letters are mapped to lower case.Thus, "abc_" (与memcmp区别就是在比较的时候不区分
2006-11-25 15:18:00 1333
原创 memcmp ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Compares count bytes of memory starting at buffer1 and buffer2 and find if equal or which one is first in lexical order. 比较内存区域buffer1和buffer2的前cou
2006-11-25 14:59:00 3566 1
原创 memchr ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】#include /* Searches at bufferfor the given character, stopping when characteris first found or cnt bytes have been searched through. 从buffer所指内存区域的
2006-11-25 13:16:00 1445 1
原创 memccpy ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】#include /* Copies bytes from src to dest until count bytes have been copied,or up to and including the character c, whichever comes first. 如果src前n
2006-11-25 12:40:00 1548
原创 memmove ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* memmove() copies a source memory buffer to a destination memory buffer.This routine recognize overlapping buffers to avoid propogation.For cases where
2006-11-25 10:29:00 1880
原创 memcpy ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* memcpy() copies a source memory buffer to a destination memory buffer. This routine does NOT recognize overlapping buffers, and thus can lead to propog
2006-11-25 10:24:00 2792 1
原创 strnicmp ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Compare the two strings for lexical order. Stops the comparison when the following occurs: (1) strings differ, (2) the end of the strings is reac
2006-11-24 09:41:00 2344
原创 stricmp ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/*_stricmp/_strcmpi perform a case-insensitive string comparision.For differences, upper case letters are mapped to lower case.Thus, "abc_" 字符串比较函数
2006-11-24 09:40:00 3010
原创 strncmp ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Compares two strings for lexical order. The comparison stops after: (1) a difference between the strings is found, (2) the end of the strings is
2006-11-24 09:39:00 2839
原创 strcmp ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* STRCMP compares two strings and returns an integer to indicate whether the first is less than the second, the two are equal, or whether the f
2006-11-24 09:38:00 4923 10
原创 strncpy ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Copies count characters from the source string to the destination. If count is less than the length of source,NO NULL CHARACTER is put onto t
2006-11-24 09:37:00 5388 8
原创 strncat ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Appends at most count characters of the string back onto the end of front, and ALWAYS terminates with a null character.If count is greater than the len
2006-11-24 09:37:00 2736 2
原创 strcat ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* Concatenates src onto the end of dest. Assumes enough space in dest. 目标指针空间必须有足够的存储空间。*/char * my_strcat ( char * dst, const char * src
2006-11-24 09:35:00 3073 4
原创 strlen ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/*得到字符串长度。(不含结束符 ‘/0’)*/int my_strlen(const char * str ){ const char *p = str; while( *p++ ) ; return( (int)(p - str - 1) );}/*当然也可以
2006-11-24 09:34:00 2450
原创 strcpy ( )【C语言库函数源代码】
【C语言库函数源代码】【本程序在Dev C++ 4.9.9.2 下编译通过】/* 下面是strcpy库函数的实现,因为库函数讲究的就是精练、简洁。所以没有其他的异常处理代码。主要的异常处理还是交给了函数的使用者,在调用前请确认目的和源指针是否都存在(不能为Null),请确认目标指针空间是否大于源字符串的空间。Copies the string src into the spot
2006-11-24 09:32:00 3820
转载 游戏引擎大全
游戏引擎大全 1. Codecreatures http://www.codecult.com 2. Ogre (free) http://ogre.sourceforge.net/ 3. Serious Engine http://www.croteam.com/engine_features.shtml 4. Jet 3D (free) http://www.jet3d.com/
2006-11-15 13:54:00 1485
转载 《中国贫富标准线》【看看自己是哪一档】
《中国贫富标准线》 超级大富豪:年收入在 5000 万以上 大富豪:年收入在 1000—5000 万 富豪:年收入在 300—1000 万之间 富人:年收入在 100—300 万之间 高产者:年收入在 30—100 万之间 中产者:年收入在 15—30 万之间 低产者:年收入在 8—15 万之间 穷 人:年收入在 3—8 万之间 很穷的人:
2006-11-14 14:30:00 1270
原创 农历两百年算法(1901~2100)【C语言代码】
【本程序在DEV C++ 4.9.9.2 下编译通过】有关农历的东西有以下几篇文章: 计算某天是星期几【C代码】 农历算法简介以及公式 农历中天干地支的计算【C代码】 农历一百年算法(1921~2021)【C语言代码】 农历两百年算法(1901~2100)【C语言代码】
2006-11-11 00:36:00 9346 7
转载 农历一百年算法(1921~2021)【C语言代码】
有关农历的东西有以下几篇文章: 计算某天是星期几【C代码】 农历算法简介以及公式 农历中天干地支的计算【C代码】 农历一百年算法(1921~2021)【C语言代码】 农历两百年算法(1901~2100)【C语言代码】 /* 下面是网上一个非常流行的计算农历的算法和C代码。但是,它只能计算 1921年 到 2021年的农历,仅仅只有一百年。稍后,我将会帖出二百年算法。
2006-11-10 23:36:00 4401
原创 农历中天干地支的计算【C代码】
【本程序在DEV C++ 4.9.9.2 下编译通过】有关农历的东西有以下几篇文章: 计算某天是星期几【C代码】 农历算法简介以及公式 农历中天干地支的计算【C代码】 农历一百年算法(1921~2021)【C语言代码】 农历两百年算法(1901~2100)【C语言代码】 unsigned int LunarCalendarTable[199] = { 0x04AE5
2006-11-09 16:30:00 5766 1
转载 农历算法简介以及公式
农历算法简介以及公式有关农历的东西有以下几篇文章: 计算某天是星期几【C代码】 农历算法简介以及公式 农历中天干地支的计算【C代码】 农历一百年算法(1921~2021)【C语言代码】 农历两百年算法(1901~2100)【C语言代码】 一、节气的计算 先给节气进行编号,从近日点开始的第一个节气编为0,编号如下及其相应的月份如下:
2006-11-09 15:12:00 10986 1
原创 计算某天是星期几【C代码】
【本程序在DEV C++ 4.9.9.2 下编译通过】有关农历的东西有以下几篇文章: 计算某天是星期几【C代码】 农历算法简介以及公式 农历中天干地支的计算【C代码】 农历一百年算法(1921~2021)【C语言代码】 农历两百年算法(1901~2100)【C语言代码】 #include /*函数名称:int GetWeekDay(int year,in
2006-11-09 14:25:00 5881 1
转载 修炼一名程序员的职业水准【转贴】(林庆忠__署名原创)
修炼一名程序员的职业水准【转贴】(林庆忠__署名原创)作者:林庆忠,1990年毕业于昆明工学院计算机软件专业,后又于1999年毕业在南京大学 完成软件工程专业硕士的学习,现供职于CNPC旗下的一个行业软件研发中心,因为在网上看了许多有经验的各路软件开发人员写的好帖,一时手痒兴起,也凑一篇壮壮声势。 假设你是一名软件专业毕业的本科学子,如何在工作中修炼成为一名有较高职业水准的程序员呢,本文试
2006-11-09 10:50:00 1813 3
转载 软件开发技术名词的解密篇【转贴】
软件开发技术名词的解密篇【转贴】"Win32编程” 很不幸,我从开始学习编程到理解这个名词中间隔了很长的时间(上个世纪的学习环境可见一斑)。很长时间里我都不明白32是指什么,我用过Dos, Win31,win95,win97...但好像没用过名为Win32的操作系统啊?很久以后我才知道,32在这里并不是指操作系统的版本号,而是指32 位。微软操作系统在win31及其以前都是DOS系统,w
2006-11-09 10:44:00 1180
原创 Google 的一道面试题的解法
Google 的一道面试题的解法Consider a function which, for a given whole number n, returns the number of ones required when writing out all numbers between 0 and n. For example, f(13)=6. Notice that f(1)=1. W
2006-11-02 16:33:00 1513 2
Ubuntu10.10搭建Android2.2基于ARM的交叉编译环境
2011-03-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人