Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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; //Ó¢ÎÄ¡¢Êý×Ö¡¢Ó¢Îıêµã
}


Ïà¹ØÎĵµ£º

ÔÚÆÁÄ»ÉÏ»­Í¼µÄC££ÊµÏÖ´úÂë


DllImportËùÔÚµÄÃû×Ö¿Õ¼ä using System.Runtime.InteropServices;
[DllImport("User32.dll")]
        public extern static System.IntPtr GetDC(System.IntPtr hWnd);   
        private void button19_Click(obj ......

´¿CʵÏÖc++Àà

//#include "stdafx.h"
/*
ÃèÊö:´¿cÄ£ÄâÀà,´¿c±àдc++Àà,´¿cʵÏÖc++ÀàµÄ¼òµ¥·¶Àý,½á¹¹Ä£ÄâÀà,struct ±àдclass.
c±àдÀàÊÇʵÏÖ´¿c±àдcom×é¼þµÄ»ù´¡¡£
*/
#include <stdio.h>
typedef struct _Vtbl
{
    void (*AddRef)(struct CObject* obj,int);//ËùÓеĺ¯ÊýµÄµÚÒ»¸ö²ÎÊýÀàËÆclassµÄÒþÄäµÄ ......

CºÍC++µÄ±ê×¼¿â

CºÍC++µÄ±ê×¼¿â
ĬÈÏ·ÖÀà   2008-02-28 14:28   ÔĶÁ3   ÆÀÂÛ0  
×ֺţº ´ó´ó  ÖÐÖР СС
http://blog.chinaunix.net/u/6776/showart_186792.html C/C++Éî²ã̽Ë÷
    ±¾Ð¡½ÚÎÒÃǸÅÀÀÒ»ÏÂC/C++±ê×¼¿âµÄȫò¡£
    C/C++±ê×¼¿âµÄÄÚ ......

C/C++ÖÐnearºÍfarµÄÇø±ð

C/C++ÖÐnearºÍfarµÄÇø±ð
      ¹Ø¼ü×ÖnearºÍfarÊÜÄ¿±ê¼ÆËã»úÌåϵ½á¹¹µÄÓ°Ï졣Ŀǰ±à³ÌÖÐʹÓò»¶à¡£
      near¹Ø¼ü×Ö´´½¨Ò»¸öÖ¸Ïò¿ÉÑ°Ö·ÄÚ´æµÍ¶Ë²¿·ÖµÄÄ¿±êÖ¸Õë¡£ÕâЩָÕëÕ¼ÓÃÄÚ´æµÄµ¥Ò»×Ö½Ú£¬²¢ÇÒËûÃÇÄܹ»Ö¸ÏòµÄÄÚ´æµ¥Ôª±»ÏÞÖƵ½256¸öλÖã¬Í¨³£ÊÇÔÚ0x0000~0x00ff·¶Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ