ÔÚwindowsÏÂͨ¹ýVC6.0µÚÒ»´ÎÓÃCµ÷ÓÃSQLite
1. ÏÂÔØSQLitewindows°æ
ÎÒÃÇ¿ÉÒÔ´ÓÏÂÁÐÍøÕ¾ÏÂÔØsqliteµÄwindows°æ¡£
http://www.sqlite.com.cn/bbs/topicdisp.asp?tid=182&topage=1#gotolast
ÏÂÔØÕâ¸öÈý¸öÎļþ£º
SQLite 3.3.7 ÏÂÔØ
windows°æ
sqlite-3_3_7.zip Õâ¸öÊÇSQLiteµÄwindows¿ÉÖ´ÐÐÎļþ
sqlitedll-3_3_7.zip Õâ¸öÊÇSQLiteµÄwindows¿âÎļþ
sqlite-source-3_3_7.zip Õâ¸öÊÇSQLiteµÄwindowsÏÂÔ´ÂëÎļþ
Èç¹ûÄãÐèÒªÔÚwindowsÏ´´½¨Êý¾Ý¿â£¬ÄÇôsqlite-3_3_7.zipÊDZØÐëµÄ
Èç¹ûÄãÐèÒªÔÚwindowsϱà³Ì£¬ÄÇôsqlitedll-3_3_7.zip¡¢sqlite-source-3_3_7.zipÊDZØÐëµÄ
Èç¹ûÄãÐèÒªÔÚwindowsÏÂѧϰÑо¿Êý¾Ý¿â£¬ÄÇôsqlite-source-3_3_7.zipÊDZØÐëµÄ
2. ±àÒë³öWindowsµÄLibÎļþ
ÕâÀï¿ÉÒԲο¼£º VC++ʹÓÃÊÂÎñÀ´Ð´SQLite3Êý¾Ý¿â
http://www.sqlite.com.cn/POParticle/4/106.Html
ÉÏÃæÎÒÃÇÏÂÔصİüÖÐûÓÐLibÎļþ£¬ÄÇôÎÒµÄ×Ô¼º¶¯ÊÖ±àÒë³öWindowsµÄLibÎļþ
ÕâÀïÊÇÓÃVCʵÏֵľßÌå·½·¨£º
Æô¶¯Ò»¸öÃüÁîÐУ¬½øÈëVCµÄ°²×°Ä¿Â¼£¬ÎÒµÄĿ¼ÊÇD:\Microsoft Visual Studio\VC98\Bin
ÔÚÕâ¸öĿ¼ÏÂÃæÓÐÒ»¸öLIB.exeÎļþ£¬¶Ô£¬Ê¹ÓÃËüÔÛÃǾÍÄÜÖÆ×÷³öÔÛÃÇÐèÒªµÄSQLite3.libÎļþ£¬
½«ÔÛÃÇÔÚSQLite¹Ù·½ÏÂÔصÄsqlite-source-3_3_7.zip°üÖеÄSQLite3.defÎļþ·Åµ½ÏàͬĿ¼£¬
»òÕß¾ø¶Ô·¾¶Ò²¿ÉÒÔ£¬ È»ºóÔÚÃüÁîÐÐÊäÈëÈçÏÂÃüÁî¡£
D:\Microsoft Visual Studio\VC98\Bin>LIB /MACHINE:IX86 /DEF:sqlite.def
ÕâÑùÎÒÃǾ͵õ½ÁËÒ»¸öSQLite3.libÎļþ
3. ÓÃVC±àÒëµÚÒ»¸öC-sqlite3µÄ³ÌÐò
ÓÃÒ»¸ö±à¼Æ÷±àдһ¸ö¼òµ¥C³ÌÐò,ÃüÃûΪ opendbsqlite.c£¬ÈçÏ£º
// name£º opendbsqlite.c
// This file is used to test C/C++ API for sqlite in VC6.0 on Windows Platform
// Author : zieckey
// 2006/11/5
#include <stdio.h>
#include "sqlite3.h"
int main( void )
{
sqlite3 *db=NULL;
char *zErrMsg = 0;
int rc;
rc = sqlite3_open("zieckey.db", &db); //´ò¿ªÖ¸¶¨µÄÊý¾Ý¿âÎļþ,Èç¹û²»´æÔÚ½«´´½¨Ò»¸öͬÃûµÄÊý¾Ý¿âÎļþ
if( rc )
{
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
exit(1);
}
else printf("open zieckey.db successfully!\n");
sqlite3_close(d
Ïà¹ØÎĵµ£º
ÒýÑÔ
¡¡¡¡C/C++ÓïÑÔÓÐÒ»¸ö²»Í¬ÓÚÆäËüÓïÑÔµÄÌØÐÔ£¬¼´ÆäÖ§³Ö¿É±ä²ÎÊý£¬µäÐ͵ĺ¯ÊýÈçprintf¡¢scanfµÈ¿ÉÒÔ½ÓÊÜÊýÁ¿²»¶¨µÄ²ÎÊý¡£È磺
printf ( "I love you" );
printf ( "%d", a );
printf ( "%d,%d", a, b );
¡¡¡¡µÚÒ»¡¢¶þ¡¢Èý¸öprintf·Ö±ð½ÓÊÜ1¡¢2¡¢3¸ö²ÎÊý£¬ÈÃÎÒÃÇ¿´¿´printfº¯ÊýµÄÔÐÍ£º
int printf ( const ......
UTF-8×î´óµÄÒ»¸öÌص㣬¾ÍÊÇËüÊÇÒ»Öֱ䳤µÄ±àÂ뷽ʽ¡£Ëü¿ÉÒÔʹÓÃ1~4¸ö×Ö½Ú±íʾһ¸ö·ûºÅ£¬¸ù¾Ý²»Í¬µÄ·ûºÅ¶ø±ä»¯×Ö½Ú³¤¶È¡£
UTF-8µÄ±àÂë¹æÔòºÜ¼òµ¥£¬Ö»ÓжþÌõ£º
1£©¶ÔÓÚµ¥×ֽڵķûºÅ£¬×ֽڵĵÚһλÉèΪ0£¬ºóÃæ7λΪÕâ¸ö·ûºÅµÄunicodeÂë¡£Òò´Ë¶ÔÓÚÓ¢Óï×Öĸ£¬UTF-8±àÂëºÍASCIIÂëÊÇ ......
#include <windows.h>
#include <stdio.h>
void FindFileInDir(char* rootDir, char* strRet)
{
char fname[256];
ZeroMemory(fname,256);
WIN32_FIND_DATA fd;
ZeroMemory(&fd, sizeof(WIN32_FIND_DATA));
HANDLE hSearch;
char filePathName[256];
char tmpPath[256];
ZeroMemory(filePathNa ......
.APS£º´æ·Å¶þ½øÖÆ×ÊÔ´µÄÖмäÎļþ£¬VC°Ñµ±Ç°×ÊÔ´Îļþת»»³É¶þ½øÖƸñʽ£¬²¢´æ·ÅÔÚAPSÎļþÖУ¬ÒÔ¼Ó¿ì×ÊÔ´×°ÔØËٶȡ£×ÊÔ´¸¨ÖúÎļþ¡£
.BMP£ºÎ»Í¼×ÊÔ´Îļþ¡£
.BSC£ºä¯ÀÀÐÅÏ¢Îļþ£¬ÓÉä¯ÀÀÐÅϢά»¤¹¤¾ß£¨BSCMAKE£©´ÓÔʼä¯ÀÀÐÅÏ¢Îļþ£¨.SBR£©ÖÐÉú³É£¬BSCÎļþ¿ÉÒÔÓÃÀ´ÔÚÔ´´úÂë±à¼´°¿ÚÖнøÐпìËÙ¶¨Î»¡£ÓÃÓÚä¯ÀÀÏîÄ¿ÐÅÏ¢µÄ£¬Èç¹ûÓ ......
1.int *p1 = *(int **)p2;
Õâ¸ö±í´ïʽ½«p2Ö¸ÏòµÄÖµµ±×öÖ¸ÕëÀàÐ͸³Öµ¸øp1
£¬½«ÆÕֵͨµ±×öÖ¸ÕëֵʹÓÃ
2.*£¨int **£©p1 = p2£»
Õâ¸ö±í´ïʽ½«p1Ö¸ÏòµÄÖµÐÞ¸ÄΪµÄp2±£´æµÄÖ¸Õë
µÄÖµ£¬½«Ö¸Õëµ±×öÆÕֵͨʹÓÃ
ÕâÊǽñÌì¿´us/OSµÄÄÚ´æ¹ÜÀíµÄʱºò¿´µ½µÄ£¬ÕæÊÇÌ«¾«±ÙÁË
°¦£¬¿´À´×Ô¼ºµÄ¼ûʶ»¹ÊÇÌ«ÉÙÁË£¬ÒÔºóµÃ¼Ó±¶Å ......