Location:
Search - char h
Search list
Description: 如何显示十六进制字符?-show how hexadecimal characters?
Platform: |
Size: 29696 |
Author: 张张里 |
Hits:
Description: VC++ 封装了队列类 /// /// /// ///// //this a example for using Queue ///////////////////////////////////////// #include "Queue.h" //define queue data struct struct QueueData { char data[20] int nId } //define queue typedef TQueue<QueueData> TMyQueue //put data into queue { QueueData data memset(&data, 0, sizeof(data)) strcpy(data.data, "hello!") data.nId = 0 m_pMyQueue.TryPut(data) } //try put data into queue { QueueData data memset(&data, 0, sizeof(data)) strcpy(data.data, "hello!") data.nId = 0 if(m_pMyQueue.TryPut(data) != 0) { MessageBox("put queue error") } else { MessageBox("put queue success") } } //get data from queue { QueueData data memset(&data, 0, sizeof(data)) m_pMyQueue.Get(data) MessageBox(data.data) } //try get data from queue { QueueData data memset(&data, 0, sizeof(data)) m_pMyQueue.TryGet(data) MessageBox(data.data) }-cohort of VC Packaging category /////////////////////////////////////////// this is a example for using Queue /////////////////////////////////////////# include "Queue . h "//define queue data struct QueueData struct (char data [20] int nId)// define queue typedef TQueuelt; QueueDatagt; TMyQueue// put data into QueueData data queue (memset (data, 0, sizeof (data)) htpasswd (data.data, "hello!") data.nId m_pMyQueue.TryPut = 0 (data))// try put data into QueueData data queue (memset (data, 0, sizeof (data)) htpasswd (data. data, "hello!") data.nId = 0 if (m_pMyQueue.TryPut (data)! = 0) (MessageBox ( "put queue error")) else (MessageBox ( "put queue success")))// get data from QueueData data queue (memset (data, 0, sizeof (data))
Platform: |
Size: 33792 |
Author: zj |
Hits:
Description: 可预置的8位计数器程序的主要部分分析
#include <AT89X51.H> //器件配置文件
#define uchar unsigned char //变量类型的宏定义
#define uint unsigned int
uchar code SEG7[10]={0x03,0x9f,0x25,0x0d,0x99, //0~9的数码管段码
0x49,0x41,0x1f,0x01,0x09}
uchar data cnt[8] //在data区定义8位长度的数组,用来存放计数值
uchar data pre_cnt[8] //在data区定义8位长度的数组,用来存放预置值
sbit drv=P3^4 //定义输出驱动端
bit set_flag //定义工作标志
bit out_flag //定义输出标志
bit keydown_flag //键按下标志
-can preset counter the eight major part of the process analysis# include
Platform: |
Size: 20480 |
Author: wyq |
Hits:
Description: */
#include <stdio.h>
#include <strings.h>
#include <signal.h>
#include <netinet/in.h>
#include <netdb.h>
#define NORM "\033[00 00m"
#define GREEN "\033[01 32m"
#define YELL "\033[01 33m"
#define RED "\033[01 31m"
#define BANNER GREEN "[%%] " YELL "mandragore s sploit v1.3 for " RED "sasser.x" NORM
#define fatal(x) { perror(x) exit(1) }
#define default_port 5554
struct { char *os long goreg long gpa long lla }
-* /# include
Platform: |
Size: 6144 |
Author: 稻草人 |
Hits:
Description: C++ Base64编码/解码源代码
inline int Base64Encode(char * base64code, const char * src, int src_len = 0)
inline int Base64Decode(char * buf, const char * base64code, int src_len = 0) 以上两个函数内联定义在base64.h中,使用时include "base64.h" 即可,编码后的长度一般比原文多占1/3的存储空间,为了效率,程序并没有检查目标存储区是否溢出,请保证有足够的存储空间。
-C Base64 encoding/decoding source code inline int Base64Encode (char* base64code, const char* src, int src_len = 0) inline int Base64Decode (char* buf, base64code const char*, int src_len = 0) over two letters few within the definition in conjunction base64.h, when used include "base64.h" can, coding the original length generally occupy more than 1/3 of storage space, in order to efficiency, procedures and did not check whether the target storage areas overflow, please ensure that there is sufficient storage space.
Platform: |
Size: 5120 |
Author: 王晓名 |
Hits:
Description: #include "stdio.h"
#include "malloc.h"
#define TRUE 1
#define n 39
#define max 500
typedef struct
{
char p[n]
float w[n][n]
}graph
graph *ga2
int visit[n]
int path[n][n]
float C[n][n]
float A[n][n] -#include "stdio.h"#include "malloc.h"#define TRUE 1#define n 39#define max 500 typedef struct { char p[n] float w[n][n] }graph graph*ga2 int visit[n] int path[n][n] float C[n][n] float A[n][n]
Platform: |
Size: 45056 |
Author: jiangshan |
Hits:
Description: /*** *5510单片机测试程序
基本测试成功
2005-8-25
write By CW
*** *** *** ****/
#include <reg52.h>
#include <absacc.h>
#define uint unsigned int
#define uchar unsigned char-/******* 5510 microcontroller basic test procedure successfully tested 2005-8-25 wr ite By CW****************************************** /# include
Platform: |
Size: 15360 |
Author: wangxing |
Hits:
Description: #include "define.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <malloc.h>
FILE *fp
/*//////////////////////////////////////////////////////////////////////////////
This is a pretreatment.
/////////////////////////////////////////////////////////////////////////////*/
void readIntoBuffer(char buffer[256])
{
char ch1
char temp
int i
for(i=0 i<256&&!feof(fp) i++)
{
ch1=fgetc(fp)
if(ch1== )-# include "define.h"# include
Platform: |
Size: 2048 |
Author: dddddddd |
Hits:
Description: avr应用有关使用注意事项如下
1 在使用例子程序之前将库文件libslavr.a 拷贝到ICCAVR 安装目录下的库文件目录中
即...\LIB\目录将头文件slavr.h 拷贝到头文件目录即...\include\目录
2 如果想使用库文件中的函数那么设置如下
1) 在文件中应使用 "#include <slavr.h>"包含slavr.h 头文件
2) 在工程选项中的Additional LIB 一栏中填入"slavr" 使用附加的libslavr.a
库文件(注意引号不需要输入)
3 libslavr.a 库中包含的函数清单如下
1) void write_lcd(unsigned char data,unsigned-avr applied to matters relating to the use of the following examples of the use of a procedure before the document libslav r.a ICCAVR copy of the installation directory of the library catalog is ... \ LIB \ directory paper's head lavr.h copy directory that is the end ... \ include \ directory 2 if they wish to use the library Functions are then installed a), the document should be used "# include
Platform: |
Size: 9216 |
Author: |
Hits:
Description: #include "intrins.h"
unsigned char SystemError
sbit SCL= P1^6 //定义串行时钟线所在口 使用时根据自己的需要
sbit SDA= P1^7 //定义串行数据线所在口 使用时根据自己的需要
#define SomeNOP() {_nop_() _nop_() _nop_() _nop_() }-# include "intrins.h" unsigned char Syste mError sbit SCL = P1 ^ 6// definition serial clock line where I use according to their needs sbit SDA P1 = ^ 7// definition of serial data lines where I use according to their needs# defin e SomeNOP () (_nop_ () _nop_ () _nop_ () _nop_ (
Platform: |
Size: 229376 |
Author: zhusheng |
Hits:
Description: #include "at89x51.h"
unsigned char code ddisp[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f} //段显0123456789,P0口-# Include at89x51.h unsigned char code ddisp [] = (0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f)// paragraph marked 0123456789, P0 I
Platform: |
Size: 1024 |
Author: ghh |
Hits:
Description: 12864液晶原程序.#include <reg52.h>
#include <intrins.h>
typedef unsigned char BYTE
typedef bit BOOL
sbit rs=P2^0
sbit rw=P2^1
sbit e =P2^2
BYTE code dis[]={"www.zansi.com"}
delay(BYTE ms)
{-12864 LCD original procedures .# Include
Platform: |
Size: 40960 |
Author: yichongwen |
Hits:
Description: #include<malloc.h>
#include<limits.h>
#include<stdio.h>
#include<graphics.h>
#include<io.h>
#include<math.h>
#include<process.h>
#include<conio.h>
#define m 100
#define OK 1
typedef int Status
typedef char TElemType /*树元素的类型*/
int t=35
int n=20
int h=14
int u=2
int leaf=0,non_l_leaf=0,non_r_leaf=0,root=0 /*各种结点数*/
char le[m],l[m],r[m],ro[m] /*用与存放各种结点*/
typedef struct BiTNode/*定义二叉树*/-# Include
Platform: |
Size: 2048 |
Author: 全文 |
Hits:
Description: 五子棋小游戏#include<stdlib.h>
#include<time.h>
#include<stdio.h>
#include<conio.h>
int chess[169]={0} /*棋盘*/
struct chess_t/*作为辅助,即是作为建意*/
{
char attack /*攻防用的,0表示守,1表示攻*/
int j /*作为优先级用*/
}chess_a[169] -Gobang game# Include
Platform: |
Size: 2048 |
Author: 庄斌 |
Hits:
Description: TC下的串口通讯.c
主程序部分
#include "uart.h"
int iBase /* com port base address */
char cHI,cLO
void compute_chksum(char cBuf[])
char hex_to_ascii(int iHex) -TC under the serial communication. C main part# Include uart.h int iBase/* com port base address*/char cHI, cLO void compute_chksum (char cBuf []) char hex_to_ascii (int iHex)
Platform: |
Size: 4096 |
Author: bound |
Hits:
Description: #include <stc12c2052AD.H>// 标准库的头文件
#include <intrins.h>
#include <absacc.h>
#define uchar unsigned char
#define uint unsigned int
Platform: |
Size: 156672 |
Author: 落落 |
Hits:
Description: 51单片连tcs230的源程序,绝对原创,可以记忆颜色。
#define uchar unsigned char
#include <reg52.h>
#include<math.h>
sbit S0=P1^7
sbit S1=P1^0 //端口定义
sbit S2=P1^1
sbit S3=P1^2
sbit OE=P1^3
sbit OUT=P3^4 //频率从TO口输入
sbit key0=P1^5
sbit LED=P1^6
sbit a=P3^0
sbit b=P3^1
uchar color //1:blue 2:green 3:red
uchar T[4] //color timer
uchar TH[4]
uchar TL[4]
uchar bizhi[4]
void time1() interrupt 3
{
TH[color]=TH0
TL[color]=TL0
T[color]=(TH[color]*0xff+TL[color])
TR0=0 //关定时器
TR1=0
TH1=0xB1
TL1=0xE0 //归0
TH0=0x00
TL0=0x00 //归0
}-51 monolithic tcs230 even the source is absolutely original, you can remember the color.# Define uchar unsigned char# Include
Platform: |
Size: 1024 |
Author: 黄胜 |
Hits:
Description: #include<stdio.h>
#include<string.h>
#include<limits.h>
#include<unistd.h>
#include<sys/types.h>
#define PROMPT_STRING "[myshell]$"
#define QUIT_STRING "exit\n"
static char inbuf[MAX_CANON]
char * g_ptr
char * g_lim
extern void yylex()
int main (void){
for( ){
if(fputs(PROMPT_STRING,stdout)==EOF)
continue
if(fgets(inbuf,MAX_CANON,stdin)==NULL)
continue
if(strcmp(inbuf,QUIT_STRING)==0)
break
g_ptr = inbuf
g_lim = inbuf + strlen(inbuf)
yylex()
}
return 0
}
-# Include <stdio.h># Include <string.h># Include <limits.h># Include <unistd.h># Include <sys/types.h># Define PROMPT_STRING [myshell] $ # define QUIT_STRING exit static char inbuf [MAX_CANON] char* g_ptr char* g_lim extern void yylex () int main (void) (for () (if (fputs (PROMPT_STRING, stdout) == EOF) continue if (fgets (inbuf, MAX_CANON, stdin) == NULL) continue if (strcmp (inbuf, QUIT_STRING) == 0) break g_ptr = inbuf g_lim = inbuf+ strlen (inbuf) yylex ()) return 0)
Platform: |
Size: 32768 |
Author: 李明 |
Hits:
Description: 一些转换代码,hex to char,char to hex-Some of the conversion code, hex to char, char to hex
Platform: |
Size: 1024 |
Author: 陈先生 |
Hits:
Description: 简易正弦波发生器
//精英团队提供
//控制信号 :P20
//数据线 :P0口-include <reg52.h>
sbit WR2 = P2 ^ 0
unsigned char code sin[256]
Platform: |
Size: 1024 |
Author: 刘海 |
Hits:
« 12
3
4
5
6
7
8
9
10
...
14
»