Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÓïÑԵĻص÷º¯Êý˼Ïë´úÂ룺
#include <stdio.h>
void *max(void *base, unsigned int nmemb, unsigned int size,
    int (*compar)(const void *, const void *))
{
    int i;
    void* max_data = base;
    char* tmp = base;
 &nbs ......

C __attribute__ Ïê½â


< type="text/javascript">
Ô­ÎÄÇë¼ûÕâÀï
¡£
GNU
CµÄÒ»´óÌØÉ«£¨È´²»±»³õѧÕßËùÖª£©¾ÍÊÇ__attribute__»úÖÆ¡£__attribute__¿ÉÒÔÉèÖú¯ÊýÊôÐÔ£¨Function    
Attribute£©¡¢±äÁ¿ÊôÐÔ£¨Variable Attribute£©ºÍÀàÐÍÊôÐÔ£¨Type Attribute£©¡£
__attribute__ÊéÐ´ÌØÕ÷ÊÇ£º__attribute__ǰºó¶¼ÓÐÁ½¸öÏ»® ......

javaÖÐʹÓÃsqliteÊý¾Ý¿â

sqliteÊý¾Ý¿âµÚÈý·½javaÀ©Õ¹°üÏÂÔØµØÖ·£ºhttp://www.zentus.com/sqlitejdbc/
ÓÐ2¸ö°ü£¬Ò»¸öÊÇnested£¨Ç¶ÈëʽµÄ£©£¬Ò»¸öÊÇnative(±¾µØµÄ)¡£
Çø±ðÔÚÓÚ:nested ²»ÐèÒª¶îÍâµÄdllÎļþ£¬µ«ÊÇËÙ¶ÈÂý¡£nativeÐèÒªÒ»¸ö¶îÍâµÄdllÎļþ£¬ËٶȺܿ졣
 1.ʹÓÃnested°ü£ºsqlitejdbc-v037-nested.jar
java´úÂ룺
java ´úÂë
packa ......

C/C++µ×²ãʵÏÖÖ¸¶¨´ÅÅÌÖ»¶Á

  C/C++µ×²ãʵÏÖÖ¸¶¨´ÅÅÌÖ»¶Á ÊÕ²Ø
Ñà¿ñͽдµÄÇý¶¯¹Ò¹³£¬ÏÞÖÆ´ÅÅÌÖ»¶Á£¬ ÓÃÓÚ±£Ö¤ÉæÃܼÆËã»úµÄÎȶ¨£¬Ï൱ÓÚ½«´ÅÅ̱ä³ÉROM #include "ntddk.h"
#include
#include #define DRIVERNAME "OnlyRead(GongXiPeng!)"     // for use in messages typedef struct tagDEVICE_EXTEN ......

linux c alarm(0)µÄº¬Òå

Linux C¡¡¡¡alarmº¯Êý---Çë¿´×îºó
¡¡¡¡alarmÒ²³ÆÎªÄÖÖÓº¯Êý£¬Ëü¿ÉÒÔÔÙ½ø³ÌÖÐÉèÖÃÒ»¸ö¶¨Ê±Æ÷£¬µ±¶¨Ê±Æ÷Ö¸¶¨µÄʱ¼äµ½Ê±£¬ËüÏò½ø³Ç·¢ËÍSIGALARMÐźš£Òª×¢ÒâµÄÊÇ£¬Ò»¸ö½ø³ÌÖ»ÄÜÓÐÒ»¸öÄÖÖÓʱ¼ä£¬Èç¹ûÔÚµ÷ÓÃalarm֮ǰÒÑÉèÖùýÄÖÖÓʱ¼ä£¬ÔòÈκÎÒÔǰµÄÄÖÖÓʱ¼ä¶¼±»ÐÂÖµËù´úÌæ¡£
ËùÐèÍ·Îļþ
¡¡¡¡#include<unistd.h>
º¯Ê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ