Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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# µ÷Óà c++ dll µÄһЩÎÊÌâ×ܽá

1.c++µÄµ½´¦º¯ÊýÖ»ÒªÔÚº¯ÊýÉêÃ÷µÄʱºò¼Ó¸öµ¼³ö¹Ø¼ü×־ͿÉÒÔÁË
2.²ÎÊýÀàÐÍÎÊÌâ,
Ò»°ãµÄc++ÖÐchar * ¶ÔÓ¦ c#ÖеÄstring
¶øc++ÖÐ char **ÀàÐ͵IJÎÊý¶ÔÓ¦c#ÖÐ ref string ÕâÖÖÒ»°ã¶¼ÊÇÓÃÀ´·µ»Ø×Ö·û´®µÄ!
3.º¯ÊýÈë¿ÚÎÊÌâ,Ò»°ã»á³öÏÖ "ÕÒ²»µ½Èë¿Úµã" Õâ¸öÎÊÌâ²»ÊÇÓÉÄãÒýÆðµÄ,¶øÊÇϵͳ×Ô¼º°ÑÃû×Ö¸ÄÁË,¸Ä³ÉʲôÑùµÄÃû×Ö½¨ÒéÄãÓà ......

³£ÓÃCÍ·Îļþ¼°ÆäÔÚ±ê×¼C++Öеı£Áô

Í·ÎļþµÄ×÷ÓÃ
ÔçÆÚµÄ±à³ÌÓïÑÔÈçBasic¡¢Fortran ûÓÐÍ·ÎļþµÄ¸ÅÄC++/C ÓïÑԵijõѧÕßËäÈ»»áÓÃʹÓÃÍ·Îļþ£¬µ«³£³£²»Ã÷ÆäÀí¡£ÕâÀï¶ÔÍ·ÎļþµÄ×÷ÓÃÂÔ×÷½âÊÍ£º
£¨1£©Í¨¹ýÍ·ÎļþÀ´µ÷Óÿ⹦ÄÜ¡£ÔںܶೡºÏ£¬Ô´´úÂë²»±ã£¨»ò²»×¼£©ÏòÓû§¹«²¼£¬Ö»ÒªÏòÓû§ÌṩͷÎļþºÍ¶þ½øÖƵĿ⼴¿É¡£Óû§Ö»ÐèÒª°´ÕÕÍ·ÎļþÖеĽӿÚÉùÃ÷À´µ÷Óÿ⹦ ......

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++ ×Ö·û´®×ÖÃæÁ¿

C ºÍ C++ ×Ö·û´®×ÖÃæÁ¿£¨String Literal£©¼ÈÓÐÏà֮ͬ´¦£¬ÓÖÓÐÒ»Ð©Çø±ð¡£Á˽âÕâЩÄÚÈݶÔÓÚ¼ÓÉî×Ö·û´®×ÖÃæÁ¿ÒÔ¼°Ïà¹ØÒ»Ð©¸ÅÄîµÄÀí½â¡¢³ÎÇåһЩ³£¼ûµÄ¸ÅÄîÎóÇø²»ÎÞÖúÒæ¡£±¾ÎÄÒÔÆÕͨ×Ö·û´®×ÖÃæÁ¿ "hello" ΪÀý×ܽá˵Ã÷ÈçÏ¡£
Ïàͬµã£º
×Ö·û´®×ÖÃæÁ¿ÊǶÔÏó
C/C++ ÖеĶÔÏó£¨Object£©Ö¸µÄÊÇÒ»¿é´æ´¢Çø¡£×Ö·û´®×ÖÃæÁ¿ÊDz»ÐèÒª´´ ......

CÖ¸Õë

 
Ö¸ÕëÊÇcºÍc++ÖеÄÄѵãºÍÖØµã¡£ÎÒÖ»¾«Í¨dosϵÄbasic¡£cÓïÑÔµÄÆäËü¸÷ÖÖÌØÐÔ£¬ÔÚbasicÖж¼ÓÐÀàËÆµÄ¶«Î÷¡£Ö»ÓÐÖ¸Õ룬ÊÇbaiscËù²»¾ß±¸µÄ¡£Ö¸ÕëÊÇcµÄÁé»ê¡£
ÎÒ²»ÏëÖØ¸´´ó¶àÊýÊéÉÏ˵µÃºÜÇå³þµÄ¶«Î÷£¬ÎÒÖ»ÊǰÑÎÒ¿´¹ýµÄÊéÖÐ˵µÃ²»Çå³þ»òûÓÐ˵£¬¶øÎÒÓÖ¾õµÃÎÒÀí½âµÃÓеãµÀÀíµÄ¶«Î÷д³öÀ´¡£ÎÒµÄÄ¿µÄÊÇ£º
1¡£Í¨¹ýдÕâЩ¶«Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ