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

Windows MobileÏ·ÃÎÊSqliteµÄNative C++·â×°

±³¾°
µ±Ç°Òƶ¯É豸¿ª·¢ÁìÓò£¬ÔÚ±¾µØÊý¾Ý´æ´¢·½Ã棬Sqlite¼¸ºõ³ÉÁËÊÂʵ±ê×¼£¬Andriod (android.database.sqlite)£¬iPhone (SQLite for iPhone SDK ºÍ FMDB for iPhone)£¬Palm WebOS (webOS SQL Tutorial)£¬Ð°汾µÄSymbianÒ²Ö±½Óbuilt-in SqliteÁË(20 million Symbian smartphones shipped in Q3 2007 Newer versions of the SymbianOS have SQLite built in.)¡£ÄÇô×÷ΪÒƶ¯É豸ÁìÓòµÄÖØÒªÒ»Ô±Windows MobileÔõô¿ÉÄÜ´í¹ýSqliteÄØ¡£
¼ò½é
Sqlite¼¸ºõ³ÉÁ¢Òƶ¯É豸¿ª·¢ÁìÓòÊý¾Ý´æ´¢·½ÃæµÄÊÂʵ±ê×¼¡£SqliteÒѾ­¹ã·º±»Ê¹Óõ½Andriod£¬iPhone£¬WebOSÒÔ¼°SymbianµÈƽ̨ÁË£¬±¾ÎĽ²ÊöÔÚWindows Mobileƽ̨ÏÂÈçºÎʹÓÃNative C++·ÃÎÊSqlite£¬Í¬Ê±½²ÊöÒ»¸ö·â×°ÀàµÄʵÏÖºÍʹÓá£
SqliteÔ´Âë
SqliteÔ´Âë¿ÉÒÔµ½ SQLite Download Page ÏÂÔØ£¬ÎÒΪÁËÊ¡ÊÂÖ±½ÓʹÓÃÁËsqlite.phxsoftware.comµÄÔÚWindows MobileϵÄbuild¹¤³Ì¡£
SqliteµÄC++·â×°
·â×°ÎÒʹÓÃÁËTyushkov NikolayµÄ·â×°CppSQLite3U¡£ÕâÀï¸ÐлegmkangµÄÍƼö¡£CppSQLite3U·â×°ÊǶÔSqliteÔ­Óд¿CµÄapi½øÐÐOOµÄC++µÄ·â×°¡£Ö÷Òª·â×°ÒÔϼ¸¸öÀࣺ
1. CppSQLite3DB Êý¾Ý¿âÀ࣬ÓÃÓÚн¨Êý¾Ý¿â£¬´ò¿ª¹Ø±ÕÁ´½Ó£¬Ö´ÐÐDDLºÍDML¡£
2. CppSQLite3Statement ÓÃÓÚÖ´ÐвÎÊý»¯µÄSQL¡£CppSQLite3DB ¿ÉÒÔÖ´ÐÐSQLµ«ÊDz»Ö§³Ö²ÎÊý»¯¡£
3. CppSQLite3Query ÓÃÓÚ¶Á³öÖ´ÐÐSelectºóµÄ²éѯ½á¹û¡£
4. CppSQLite3Exception ÓÃÓÚ²¶×½Òì³£¡£
¼òµ¥Ã÷Á˵ķâ×°ÁËSqlite¡£
·â×°ÀàµÄʹÓÃ
ʹÓ÷½·¨Ô´×ÔÓÚÎÒ¶ÔCppSQLite3UÀàµÄµ¥Ôª²âÊÔ¡£¼ûÔ´ÎļþµÄSqliteHelperTest.h¡£
´´½¨Êý¾Ý¿âÎļþ
TEST(SqliteHelper, CreateDatabase){    try    {        CppSQLite3DB db;        DeleteFile(DB_FILE_NAME);        db.open(DB_FILE_NAME);        db.close();    }    catch(CppSQLite3Exception e)    {        FAIL(ToString(e.errorMessage()).c_str());    }    TRACE("Create database successful.");}µ÷ÓÃCppSQLite3DB µÄopen()º¯ÊýµÄʱºòÈç¹û·¢ÏÖûÓÐÊý¾Ý¿âÎļþ¾Í»áн¨Ò»¸öÊý¾Ý¿âÎļþ¡£SqliteµÄÔ´´úÂëÈçÏÂ(¼ûsqlite3.c)£º
rc = ope


Ïà¹ØÎĵµ£º

ÓÃC/C++×öDLLº¯ÊýµÄµ¼³ö·½·¨

ÓÉÓÚVC±àÒëÆ÷Óк¯ÊýÖØÃüÃûµÄ¹¦ÄÜËùÒÔ£¬È·¶¨º¯ÊýÃûÓÐÁ½ÖÖ·½Ê½£º
1.extern "C"
2.ʹÓÃ.defÎļþ
ÕâÁ½ÖÖÒ²¿ÉÒÔÒ»ÆðʹÓá£
ÏÂÃæÊÇÒ»¸öÀý×Ó£º
extern "C" _declspec(dllexport)int __stdcall JieCheng(int a)
{//½×³Ëº¯Êý¡£ÊäÈë:ÕýÕûÊý¡£Êä³ö:Õâ¸öÊýµÄ½×³ËÖµ
 int b=1;
 for(int i=1;i<=a;i++)
 {
&n ......

C/C++ ÃæÊÔÌâ

µÚÒ»Ì⣺
ÏÂÃæ³ÌÐòµÄÊä³ö½á¹û£¿
#include <stdio.h>
#include <iostream>
void main()
{
char str1[] = "";
char str2[] = "";
const char str3[] = "abc";
const char str4[] = "abc";
const char* str5 = "abc";
const char* str6 = "a ......

C/C++ Óë JAVA µÄ»¥²Ù×÷

Ç°ÑÔ£ºÇ°¶Îʱ¼äÔÚCSDNµÄC++ÉçÇøÓöµ½Ò»¸öÐèÒª·â×°¿¼ÇÚ»ú½Ó¿ÚµÄ¶¯Ì¬¿â¸øJAVAµ÷ÓõÄÌû×Ó£¬¹´ÆðÁËÎÒ¶ÔJAVAµÄÎÞÏÞ»³Äî¡£ÔÚ´Ë£¬ÎÒÏë°ÑÕâÏî¼¼Êõ¼òµ¥ÔÙ½éÉÜһϡ£
Ò»¡¢¹ØÓÚJava Native Interface (JNI)
JNIÊÇJAVA±¾µØ±à³Ì½Ó¿Ú£¬ÊôÓÚJDKµÄÒ»²¿·Ö¡£ËüÔÊÐíJAVAÄܹ»²Ù×÷±¾µØAPI»òÓÉÆäËûÓïÑÔ±àдµÄ¶¯Ì¬¿â¡£²»¹ýµ±ÄãʹÓÃÕâÏî¼¼ÊõµÄʱºò£ ......

CºÍC++ÓïÑÔѧϰ×ܽá(Ò»)

CºÍC++ÓïÑÔѧϰ×ܽá(Ò»)
֪ʶ½á¹¹:
1¡¢if,for,switch,goto
2¡¢#define,const
3¡¢Îļþ¿½±´µÄ´úÂë,¶¯Ì¬Éú³ÉÄÚ´æ,¸´ºÏ±í´ïʽ,strcpy,memcpy,sizeof
4¡¢º¯Êý²ÎÊý´«µÝ,ÄÚ´æ·ÖÅ䷽ʽ,ÄÚ´æ´íÎó±íÏÖ,mallocÓënewÇø±ð
5¡¢ÀàÖØÔØ¡¢Òþ²ØÓ븲¸ÇÇø±ð,externÎÊÌâ,º¯Êý²ÎÊýµÄȱʡ
ÖµÎÊÌâ,ºê´úÂëÓëÄÚÁªº¯ÊýÇø±ð
6¡¢¹¹ÔìºÍÎö¹ ......

C/C++ʱ¼äº¯ÊýµÄʹÓÃ

Ò»¡¢»ñÈ¡ÈÕÀúʱ¼ä
time_tÊǶ¨ÒåÔÚtime.hÖеÄÒ»¸öÀàÐÍ£¬±íʾһ¸öÈÕÀúʱ¼ä£¬Ò²¾ÍÊÇ´Ó1970Äê1ÔÂ1ÈÕ0ʱ0·Ö0Ãëµ½´ËʱµÄÃëÊý£¬Ô­ÐÍÊÇ£º
 typedef long time_t;        /* time value */
¿ÉÒÔ¿´³ötime_tÆäʵÊÇÒ»¸ö³¤ÕûÐÍ£¬ÓÉÓÚ³¤ÕûÐÍÄܱíʾµÄÊýÖµÓÐÏÞ£¬Òò´ËËüÄܱíʾµÄ×î³Ùʱ¼äÊÇ2038Äê ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ