自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(21)
  • 收藏
  • 关注

转载 sprintf

sprintf 是个变参函数,定义如下:int sprintf( char *buffer, const char *format [, argument] ... );除了前两个参数类型固定外,后面可以接任意多个参数。而它的精华,显然就在第二个参数:格式化字符串上。printf 和sprintf 都使用格式化字符串来指定串的格式,在格式串内部使用一些以“%”开头的格式说明符(

2014-06-08 00:06:37 435

转载 C/S Linux _chat room

//client.h#ifndef _CLIENT_H__#define _CLIENT_H__#include#include#include #include #include #include #include #include #include #include #include #include #include

2013-04-04 23:32:29 1047 1

转载 复制学习 Linux FD_SET及select()详解

jerryking博客园园子首页新随笔联系管理订阅随笔- 29  文章- 0  评论- 0 Linux: fd_set用法select()机制中提供一fd_set的数据结构,实际上是一long类型的数组,每一个数组元素都能与一打开的文件句柄(不管是socket句柄,还是其他文件或命名管道或设备句柄)建立联系

2013-04-04 15:41:09 895

原创 num_rmb 数字到字符串的转换

package package1;import java.util.Arrays;public class num_rmb { private static final String numStr = null; private String[] hanArr  = {"零","壹","貳","叁","肆","伍","陆","柒","捌","玖"}; private Strin

2012-05-21 11:05:26 489

原创 面向对象 上

类可被任务是一种自定义的数据类型。可以使用类来定义变量,所有使用类定义的变量都是引用变量,他们将会引用到类的对象。类时客观世界里某一类对象的共同特征,对象时类的具体存在,java程序使用类的构造器来创建该类的对象。 java 支持面向对象的三大特征:封装,继承,多态。 private protected public 实现封装,信息安全 extends 继承 使用继承来实现复用时

2012-05-21 11:04:36 269

原创 能否使用sort()函数按二维数组的x,y数轴进行排序?

int a,b1[25][25],max[25];int i,t = 0, counter = 0;  while(1) {  while(cin>>a,a)  {   b1[counter][t] = a;   t++;     if(a =

2011-10-14 13:12:10 616

原创 HDU..1406++错误RUNTIME 求简单算法。求纠错。谢谢。C++新手

#include using namespace std;int perfects(int a){ //a 判定单个数字是否为完数  int i,t = 0,b[110];  int sum = 0; for(i = 0; i  {  if(a

2011-10-12 20:22:40 951

原创 进制问题

源代码:#include #inlcude #include using namespace std;char *int2str(int num,int radix,char *result) { if (numnum=abs(num);

2011-10-04 12:30:13 786

原创 x = power(a , (n -1)>>1);

甚么意思啊??power(a,n-1) 我知道是甚么意思。。后面那个    >>1  何解??

2011-10-04 11:17:08 627 3

原创 有错误的。任意进制转换类模版。求指教。

#include#include"head.h"using namespace std;void main(){ /*xconvert10 num; num.input(); num.array_convert(); num.convert();

2011-10-02 14:04:38 1497

原创 c任意进制转换。甚么时候能看懂呢。。

#include "stdafx.h" #include #include #include #include #include #define WIDTH 10 #define DATAWIDTH 50 #define MAX 42

2011-10-02 13:57:55 318

原创 DBMS char nchar varchar nvarchar 区别

nchar,char,varchar 与nvarchar区别    char类型: 对英文(ASCII)字符占用1个字节,对一个汉字占用2个字节,CHAR存储定长数据很方便,CHAR字段上的索引效率级高,比如定义 char(10),那么不论你存储的数据是否达到了10个

2011-09-14 18:52:02 249

原创 stlen()

strlen() 下面几种实现strlen函数的源代码大家参考  -------------------------------------------------1:start------------------------------------  #

2011-09-14 18:35:28 1021

原创 memset()

memest原型 (please type "man memset" in your shell)  void *memset(void *s,  int c, size_t n); memset:作用是在一段内存块中填充某个给定的值,它对较大的结构体或数组进行清零操作的

2011-09-14 17:22:49 276

原创 1.2.2...

做错了。回文:3olleh !dlrowm'I morf .udhI ekil .mca Sample Outputhello world!I'm from hdu.I like acm.

2011-09-14 16:36:01 388

原创 seach_bin(a[10],m);。。引发的血案。

#include #include using namespace std;int seach_bin(int t[],int k){ int low,high,mid; low = 1; high = 10; while(low  {

2011-09-08 16:41:41 643

原创 寻找子串

大体格式:#include #include #include #include using namespace std;int main (){ int n,m,i,j,sign; bool b = false; char *p,*q;

2011-09-08 16:10:31 305

原创 中间数

#include #include #include using namespace std;int main (){ int a[110],i,n; while(cin>>n,n) {  for( i = 0; i   {   cin

2011-09-08 15:56:50 273

原创 cin.getline().积累

1.cin.getline是读入一行字符,比如: #include void main() { char str[20]; coutcin.getline(str,20); cout} 当输入:abd cdrasdf g的时候就会输出:abd

2011-09-08 15:08:15 475 2

原创 scanf/ 格式化说明符/各种进制的分别读入、

/*函数名:   scanf   功     能:   执行格式化输入   用     法:   int   scanf(char   *format[,argument,...]); scanf()函数是通用终端格式化输入函数,它从标准输入设备(键盘)   读取输入

2011-09-08 14:56:28 767

原创 2381.字符串的操作。string(长度,‘所需输出的内容’)

#include #include using namespace std;int main() {     int n,i;    while(cin>>n,n)    {     for(i=1;i    cout  for(i=1

2011-09-08 14:35:38 268

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除