自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 获取串中的参数段,比如你输入一个字符串 set_tcp 127.0.0.1,9999; 这里有三个参数

char _Buffer[512]; string str = gets(_Buffer); string str_ary[20]; string temp_s; int s=0,e=0,i=0,j=0; for(i =0;i {  e = find_separator(str,s+j);  temp_s.assign(str,s+j,e-s-j);  if( !temp_s.empty()){ 

2008-05-13 12:00:00 346

原创 设置你想要的 分隔符号 比如,;/t 等,这个函数就可以在字符串里边查找分隔符号了

int find_separator(string &str,int start){ bool list_separator[128]; int *p_area = (int *)list_separator; int *p_end = p_area + 32; while(p_area list_separator[0] = true; list_separator[/t] = true

2008-05-13 11:53:00 589

原创 字符串 转 BCD,有四舍五入的功能,参数1 字节数,参数2 小数位数。

void str_to_bcd(char *p_sourse,char *p_dest,int d_len,int dig_len){ unsigned char _buf[20]; unsigned char *p_e = (unsigned char *)p_dest; bool carry = false; int *_s = (int *)_buf; while(_s int i = 0,

2008-05-13 11:49:00 446

原创 int 转 BCD,改造别人的函数而来。

int decm_to_bcd(int s_num){ if(s_num99999999) return -1; unsigned int d_num = 0;    int pow = 10000000; short num_c = 0; short shift_c = 28; while(pow > 0){  for(;s_num >= pow;s_num -= pow) num_c+

2008-05-13 11:46:00 665

原创 socket里面的10035

bool tcp_s_lay::receive(char *p_dst, int length) { int temp = 0; int received = 0; int err_c = 0; do{  temp = ::recv(soc_ary[act_soc],p_dst+received,length - received,0);  if(temp = SOCKET_ERROR){   i

2008-05-07 17:36:00 1654

空空如也

空空如也

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

TA关注的人

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