cÅжϺº×Ö
#include <windows.h>
int IsGB(PTSTR pText);
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
static TCHAR szText[] = {TEXT ("i·þ,ÁË¡£u£ù")} ;
PTSTR pText;
int i;
unsigned char sqChar[20];
pText=szText;
while (*pText != '\0')
{
i=IsGB(pText);
switch(i)
{
case 0:
pText++;
MessageBox (NULL, TEXT ("·¢ÏÖÊý×Ö¡¢Ó¢ÎÄ×Ö·û»òÓ¢Îıêµã"), TEXT ("Hello"), 0);
break;
case 1:
pText++;
pText++;
MessageBox (NULL, TEXT ("·¢ÏÖÈ«½Ç×Ö·û"), TEXT ("Hello"), 0);
break;
case 2:
pText++;
pText++;
MessageBox (NULL, TEXT ("·¢ÏÖºº×Ö"), TEXT ("Hello"), 0);
break;
}
}
return 0 ;
}
int IsGB(PTSTR pText)
{
unsigned char sqChar[20];
sqChar[0]=*pText;
if (sqChar[0]>=0xa1)
if (sqChar[0]==0xa3)
return 1; //È«½Ç×Ö·û
else
return 2; //ºº×Ö
else
return 0; //Ó¢ÎÄ¡¢Êý×Ö¡¢Ó¢Îıêµã
}
Ïà¹ØÎĵµ£º
//»ñµÃºº×ÖµÄÇøÎ»Âë
¡¡¡¡byte[] array = new byte[2];
¡¡¡¡array = System.Text.Encoding.Default.GetBytes("°¡");
int i1 = (short)(array[0] - ''\0'');
¡¡¡¡int i2 = (short)(array[1] - ''\0'');
//unicode½âÂ뷽ʽϵĺº×ÖÂë
¡¡¡¡array = System.Text.Encoding.Unicode.GetBytes("°¡");
¡¡¡¡i1 = (short)(arra ......
DllImportËùÔÚµÄÃû×Ö¿Õ¼ä using System.Runtime.InteropServices;
[DllImport("User32.dll")]
public extern static System.IntPtr GetDC(System.IntPtr hWnd);
private void button19_Click(obj ......
¿´Êý¾Ý½á¹¹ñÍÕ»µÄʱºòдÁËÕâôһ¶Î´úÂë
#include<stdio.h>
#include<stdlib.h>
struct linkstack
{
int data;
struct linkstack *next;
};
int initstack(linkstack * S)
{
S = (linkstack *)malloc(sizeof(linkstack));
if(S == NULL) return 0;
S->next = NULL;
return 1;
}
int main(int ......
NandFlashϵÁÐÖ®¶þ£ºS3C2410¶ÁдNand Flash·ÖÎö
2009Äê12ÔÂ09ÈÕ ÐÇÆÚÈý 09:06
Ò»¡¢½á¹¹·ÖÎö
S3C2410´¦ÀíÆ÷¼¯³ÉÁË8λNandFlash¿ØÖÆÆ÷¡£Ä¿Ç°Êг¡Éϳ£¼ûµÄ8λNandFlashÓÐÈýÐǹ«Ë¾µÄk9f1208¡¢k9f1g08¡¢k9f2g08µÈ¡£k9f1208¡¢k9f1g08¡¢k9f2g08µÄÊý¾ÝÒ³´óС·Ö±ðΪ512Byte¡¢2kByte¡¢2kByte¡£ËüÃÇÔÚѰַ·½Ê½ÉÏÓÐÒ»¶¨²îÒ죬ËùÒÔ³ÌÐ ......