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


Ïà¹ØÎĵµ£º

SQLiteѧϰ±Ê¼Ç£¨2£©

ÔÙ˵ÔÚlinuxϽ¨Á¢.a ºÍµãso
     µ½ÍøÕ¾ÏÂÔØ sqlite-amalgamation-3.6.22.tar.gz Õâ¸ö°ü£¬·´ÕýÎÒÏÂÁËsqlite3-3.6.22.bin.gz½âѹºó±àÒë²»ÁË¡£
     ½âѹ£¬ÔËÐÐ
    #  ./configure --host=armv5l-linux --prefix=/opt/sqlite3/arm --enable-threadsafe. ......

ÔÚC#Àï´´½¨ºÍʹÓÃC·ç¸ñÊý¾Ý½á¹¹

ÔÚC#Àï´´½¨ºÍʹÓÃC·ç¸ñÊý¾Ý½á¹¹£¬¼´·ÇÍйܵÄÊý¾Ý½á¹¹£¬¿ÉÒÔÌá¸ßÐÔÄÜ¡£
1 Êý¾Ý½á¹¹µÄ¶¨Òå
¿´ÏÂÃæÀý×Ó£º
    unsafe struct A {
        public int x;
    }
    unsafe struct B {
        pu ......

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 ......

Cº¯Êýµ÷ÓÃÔ¼¶¨

CÖвÉÓÃÁ˲»Í¬µÄµ÷Ó÷½Ê½À´µ÷Óú¯Êý£¬ÕâÀïµÄº¯Êýµ÷ÓøÅÄî¿ÉÄÜÓëÎÒÃÇͨ³£ËùÀí½âµÄº¯Êýµ÷ÓÃÓÐËù²»Í¬£¬ËüÃÇÖ¸µÄÊÇ´¦ÀíÆ÷ÔÚ´¦Àíº¯ÊýÉϵIJîÒì¡£Àí½âÕâЩ²»Í¬µÄ·½Ê½ÓÐÖúÓÚÎÒÃÇÀ´µ÷ÊÔ³ÌÐòºÍÁ´½ÓÎÒÃǵĴúÂë¡£ÔÚ´ËÎÒÏëÌÖÂÛÒ»ÏÂÖ÷ÒªµÄËÄÖÖº¯Êýµ÷Ó÷½·¨ÒÔ¼°Ö®¼äµÄÇø±ð£¬ËüÃÇÊÇ__stdcall¡¢__cdecl¡¢__fastcall¡¢thiscall¡£µ±È»£¬»¹ÓÐһР......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ