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

C++ÖÐʹÓÃsqlite

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include ".\sqlite3_lib\sqlite3.h"
 
static int _callback_exec(void * notused,int argc, char ** argv, char ** aszColName)
{
    int i;
    for ( i=0; i<argc; i++ )
    {
        printf( "%s = %s\n", aszColName[i], argv[i] == 0 ? "NUL" : argv[i] );
    }
    return 0;
}
void main(int argc,char *argv[])
{
 
const char * sSQL = "select * from animal;";
const char * sSQL1 = "insert into animal(id) values('233');";
    char * pErrMsg = 0;
    int ret = 0;
    sqlite3 * db = 0;
    ret = sqlite3_open("demo.sqb", &db);
    printf("%d\n",ret);
    if ( ret != SQLITE_OK )
    {
        fprintf(stderr, "Could not open database: %s", sqlite3_errmsg(db));
        exit(1);
    }
    printf("Successfully connected to database\n");
    sqlite3_exec( db, sSQL, _callback_exec, 0, &pErrMsg );
    if ( ret != SQLITE_OK )
    {
   
  fprintf(stderr, "SQL error: %s\n", pErrMsg);
        sqlite3_free(pErrMsg);
    }
    sqlite3_exec( db, sSQL1, _callback_exec, 0, &pErrMsg );
    if ( ret != SQLITE_OK )
    {
   
  fprintf(stderr, "SQL error: %s\n", pErrMsg);
        sqlite3_free(pErrMsg);
    }
    sqlite3_exec( db, sSQL, _callback_exec, 0, &pErrMsg );
    if ( ret != SQLITE_OK )
    {
   
  fprintf(stderr, "SQL error: %s\n", pErrMsg)


Ïà¹ØÎĵµ£º

ECLIPSE ¿ª·¢ C/C++ ¹¤³Ì

  ×î½üÒ»¸öÅóÓÑ×¼±¸°ÑC´úÂëÔÚECLIPSEÉϱàÒ룬ÒÔÇ°Ò»Ö±¸ãµÄJAVA£¬Ò²ÖªµÀECLIPSEÖ§³ÖC¹¤³Ì£¬µ«ÊÇ×Ô¼º´ÓÀ´Ã»¸ã¹ý£¬ËùÒÔ¾Í×Ô¼ºÏÈ´ÓÍøÂçÉÏÕÒ×ÊÁÏ£¬Ö÷Òª·½·¨ÈçÏÂ
1¡¢°²×°JDKºÍEclipse
ÕâÀï¾Í²»¶à˵£¬¾ßÌåÇë¼û£ºhttp://blog.chinaunix.net/u/16292/showart_223309.html
Îҵݲװ»·¾³ÊÇjdk1.5£¬eclipse3.2.1
2¡¢°²×°C++µÄE ......

½«Win32 C/C++Ó¦ÓóÌÐòǨÒƵ½Linux

±¾ÎĵÄÄÚÈÝÊÇ Win32 API£¨ÌرðÊǽø³Ì¡¢Ï̺߳͹²ÏíÄÚ´æ·þÎñ£©µ½ POWER ÉÏ Linux µÄÓ³Éä¡£±¾ÎÄ¿ÉÒÔ°ïÖúÄúÈ·¶¨ÄÄÖÖÓ³Éä·þÎñ×îÊʺÏÄúµÄÐèÒª¡£×÷ÕßÏòÄúÏêϸ½éÉÜÁËËûÔÚÒÆÖ² Win32 C/C++ Ó¦ÓóÌÐòʱÓöµ½µÄ API Ó³Éä¡£
¸ÅÊö
Óкܶ෽ʽ¿ÉÒÔ½« Win32 C/C++ Ó¦ÓóÌÐòÒÆÖ²ºÍǨÒƵ½ pSeries ƽ̨¡£Äú¿ÉÒÔʹÓÃÃâ·ÑÈí¼þ»òÕßµÚÈý·½¹¤¾ßÀ´ ......

c/vc++ »·¾³Ï²»Í¬µÄÎļþ³¤¶È»ñÈ¡·½·¨

£¨Ò»£©
¶ÔÎļþ²Ù×÷ʱÓÐʱ»ñµÃÎļþµÄ´óСʱ±ØÒªµÄ.ÏÂÃæÊÇ»ñµÃÆä´óССµÄ½Ï¼òµ¥·½·¨.
#include<io.h>   //CÓïÑÔÍ·Îļþ
#include<iostream>   //for system();
using namespace std;
int main()
{
  int handle;
  handle = open("test.txt", 0x0100); //open file for rea ......

PHPÀ©Õ¹C++


Õâ¸öÎĵµ¼òµ¥½éÉÜÁËÔõôʹÓÃC++ΪPHP±àдһ¸öÀ©Õ¹Ä£¿é¡£ÎÒÒѾ­±»Îʼ°Õâ¸öÎÊÌâÎÞÊý´ÎÁË£¬ËùÒÔÎÒ¾ö¶¨ÎªºóÀ´Õßдһ¸ö¼òµ¥µÄHOWTO¡£ÕâƪÎÄÕÂÖ»»á˵Ã÷һЩҪµãºÍ¹Ø¼üÖ®´¦£¬Èç¹ûÄãÏ£ÍûѧϰC++»òPHP£¬Çë²éÔÄÆäËüµÄÎĵµ¡£
˳±ã£¬ÔÚ±¾ÎÄÖÐÎÒÃÇÒ²»á¿´Ò»ÏÂÔÚPHP5ÖÐÔõô°ÑC++ÀàÓ°Éäµ½PHPÖС£ÎÄÕÂÖеÄÀý×Ó¿ÉÒÔÔÚPHP4ºÍPHP5µÄ»·¾³ÏÂÊ¹Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ