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

SQLite3µÄC±à³Ì

/*=================================
.*  The Standard include file.
.*
.*===============================*/
#include <stdio.h>
#include <stdlib.h>
/*=================================
.*
.*  The extend include file.
.*
.*===============================*/
#include "sqlite3.h"
/* #include "sqlite3ext.h"  */
int main()
{
     /* Connect SQLite system. */
     sqlite3 *pDatabase = NULL;
     int result;
     char sql[500];
     char *err_msg = NULL;
     int i;
     result = sqlite3_open("test.db3", &pDatabase);
     if( result != SQLITE_OK ) {
          printf("Failure to open the database.\n");
          return -1;
     } else
          printf("Good to open the database.\n");
     sprintf(sql,"BEGIN");
     sqlite3_exec(pDatabase, sql,0,0,err_msg);
     sprintf(sql, "CREATE TABLE [TestDB] (\
                   [id] int, [name] varchar(20), [age] int)");
     /*
     if (SQLITE_OK != sqlite3_exec(pDatabase, sql, 0, 0, &err_msg)) {
          printf("operate failed: %s.\n", err_msg);
          return -1;
     }*/
     for(i = 0; i < 10000; i++) {
          sprintf(sql, "INSERT INTO [TestDB] ([id], [name], [age]) \
                    


Ïà¹ØÎĵµ£º

C/C++ ×Ö·û´®´¦Àíº¯Êý

¸Õ¿ªÊ¼Ñ§C/C++ʱ£¬Ò»Ö±¶Ô×Ö·û´®´¦Àíº¯ÊýÒ»Öª°ë½â£¬ÕâÀïÁоÙC/C++×Ö·û´®´¦Àíº¯Êý£¬Ï£Íû¶Ô³õѧÕßÓÐÒ»¶¨µÄ°ïÖú¡£
C£º
char st[100];
1. ×Ö·û´®³¤¶È
   strlen(st);
2. ×Ö·û´®±È½Ï
   strcmp(st1,st2);
   strncmp(st1,st2,n);   °Ñst1,st2µÄÇ°n¸ö½øÐбȽϡ£
3. ¸½¼Ó
 & ......

Ñ¡ÔñÅÅÐòÓëðÅÝ·¨ÅÅÐòµÄC´úÂëʵÏÖ

Ñ¡ÔñÅÅÐò·¨ÀàËÆÎÒÃÇÈËΪµÄÅÅÐòÏ°¹ß£º´ÓÊý¾ÝÖÐÑ¡Ôñ×îСµÄͬµÚÒ»¸öÖµ½»»»£¬ÔÚ´ÓʡϵIJ¿·ÖÖÐÑ¡Ôñ×îСµÄÓëµÚ¶þ¸ö½»»»£¬ÕâÑùÍù¸´ÏÂÈ¥……
Ñ¡ÔñÅÅÐòµÄƽ¾ùʱ¼ä¸´ÔӶȱÈðÅÝÅÅÐòµÄÉÔµÍ:
ͬÑùÊý¾ÝµÄÇé¿öÏ£¬2ÖÖËã·¨µÄÑ­»·´ÎÊýÊÇÒ»ÑùµÄ£¬µ«Ñ¡ÔñÅÅÐòÊÇÒ»¶Ô¶àµÄ±È½Ï£¬Ã¿ÌËÖ»½øÐÐ0µ½1´Î½»»»£¬¶øðÅÝÅÅÐòÊÇÏàÁÚÁ½Á½±È½Ï£ ......

The C Programming Language ¾­µä´úÂë any(s1,s2)

/*
* Exercise 2-5 Page 48
*
* Write the function any(s1,s2), which returns the first location
* in the string s1 where any character from the string s2 occurs,
* or -1 if s1 contains no characters from s2. (The standard library
* function strpbrk does the same job but returns a pointer t ......

50¸öc/c++Ô´´úÂëÍøÕ¾(תÔØ£©

source: http://blog.renren.com/blog/229071289/443686923
C/C++ÊÇ×îÖ÷ÒªµÄ±à³ÌÓïÑÔ¡£ÕâÀïÁгöÁË50ÃûÓÅÐãÍøÕ¾ºÍÍøÒ³Çåµ¥£¬ÕâЩÍøÕ¾Ìṩc/c++Ô´´úÂë¡£Õâ·ÝÇåµ¥ÌṩÁËÔ´´úÂëµÄÁ´½ÓÒÔ¼°ËüÃǵÄС˵Ã÷¡£ÎÒÒѾ¡Á¦°üÀ¨×î¼ÑµÄC/C++Ô´´úÂëµÄÍøÕ¾¡£Õâ²»ÊÇÒ»¸öÍêÕûµÄÇåµ¥£¬ÄúÓн¨Òé¿ÉÒÔÁªÏµÎÒ£¬ÎÒ½«»¶Ó­ÄúµÄ½¨Ò飬ÒÔ½øÒ»²½¼ÓÇ¿Õâ·½Ãæ ......

ÊÓƵ»áÒéÔ´Â루C/C++£©

ϵͳ½éÉÜ£º
      ´Ëϵͳ¾ßÓд«Í³ÊÓƵ»áÒéµÄÒ»Çй¦ÄÜ£¬»ùÓÚä¯ÀÀÆ÷½çÃ棬¿ÉÒÔ¿ØÖÆÔ¶³ÌµÇ½£¬²Î»áÕß¿ÉÒÔͬʱ¿´µ½Ñݽ²ÕߺÍÑݽ²ÄÚÈÝ£¬²¢ÇåÎúµÄÌýµ½Ñݽ²ÕßÉùÒô£¬ÒѾ­ÁË»ØÉùºÍÔëÒôµÄ´¦Àí£¬´ËÍ⻹¿ÉÒÔͬÉù´«Ò룬ÒÔÂú×㲻ͬÓïÖֲλáÈ˵ÄÒªÇ󡣲λáÕß»¹ÄÜʵÏÖ¶à»á³¡×ÔÓÉÇл»£¬²¢¿É²¥·ÅPPTµÈ¡£
ÐèÒªµÄÇëÁª ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ