Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÓÃapiµ÷ÓöԻ°¿ò

#include <windows.h>
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nShowCmd )
{
OPENFILENAME ofn;
//ÔÚÄÚ´æÖпª±ÙÒ»¿é¿Õ¼ä£¬´æ·ÅÓû§Ñ¡È¡µÄÎļþÃû
char szFile[MAX_PATH];//MAX_PATH ......

cÓïÑÔ»ù´¡£¨ÊÇʱºò²¹²¹cµÄ»ù´¡ÁË£©

¿´Êý¾Ý½á¹¹ñÍÕ»µÄʱºòдÁËÕâôһ¶Î´úÂë
#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 ......

CÖ¸Õë

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

ÔÚVC6ÖÐʹÓÃc API·½Ê½Á¬½ÓMySQLÊý¾Ý¿â

ÔÚVC6ÖÐʹÓÃc API·½Ê½Á¬½ÓMySQLÊý¾Ý¿â
Ò»¡¢»·¾³ÅäÖÃ
1¡¢ÔÚMySqlµÄ¹Ù·½ÍøÕ¾ÏÂÔØmysql-connector-c-noinstall£¬²¢½«½âѹºóµÄbinºÍincludeÎļþ¼Ð¿½±´µ½MysqlµÄ°²×°Ä¿Â¼
2¡¢ÉèÖÃVC6»·¾³£¬ÔÚvc¹¤¾ß-Ñ¡Ïî-Ŀ¼£¬¼ÓÈë¸Õ²ÅµÄIncludeÎļþ¼ÐµÄ·¾¶£¬ÀýÈ磺C:\Program Files\MySQL\MySQL Server 5.1\include
¶þ¡¢¹¤³ÌÉèÖÃ
3¡¢½«li ......

The C Programming Language

To be continued...
µÚ8Õ UNIXϵͳ½Ó¿Ú
#include <stdio.h>
#include <fcntl.h>
#include "syscalls.h"
#defien PERMS 0666
void error(char *, ...);
/* cpº¯Êý: ½« f1 ¸´ÖƵ½ f2 */
int main(int argc, char *argv[])
{
    int f1, f2, n;
    char buf[BUFSIZ]; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ