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

GNU C Library——×îÈ«µÄ£Ãº¯Êý˵Ã÷

ǰÌìдһ¸öС³ÌÐò, ͻȻ·¢ÏÖÆäʵżµÄCѧµÄ²»ÔõôÑù°¡£¬ºÃ¶àº¯Êý¶¼²»¼ÇµÃ£¬ÔÚÍøÉÏËѵ½µÄ¶¼ÊÇЩÂÒÆß°ËÔãµÄ£¬Ã»ÓÐÔ­ÐÍ£¬ÓÃÆðÀ´²»·ÅÐÄ£¬ÓãÅÎÄËÑ£¬Ëѵ½ÕæÕýµÄBible——
The GNU C Library Manual
ÕâÀïÃæÌ«È«ÁË£¬Ö»ÊÇÓÐÒ»µã²»Ì«ºÃ£¬£ÅÎĵ쬶ÁÆðÀ´ÓеãÂý£¬¸Ð¾õÓеãÀË·Ñʱ¼ä
ÓãÃдÁ˶ÎС³ÌÐò°ÑÒ»¸öÎå±ÊÂëÎı¾Îĵµ×ªÎªSQLite3¸ñʽµÄÊý¾Ý¿â
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <regex.h>
#include <sqlite3.h>
int main(int argc, char** argv)
{
sqlite3 *db = NULL;
char *zErrMsg = 0;
int rc = 0;

rc = sqlite3_open("wubi.db",&db);
if( rc )
{
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
exit(1);
}
char *sql, insert[256];
sql = "CREATE TABLE word (cn VARCHAR(3) NOT NULL, first VARCHAR(4) NOT NULL, sec VARCHAR(4), pri SMALLINT DEFAULT 0)";
sqlite3_exec( db, sql, 0, 0, &zErrMsg );
sql = "CREATE TABLE wordgroup (cn VARCHAR(12) NOT NULL, first VARCHAR(4) NOT NULL, ind SMALLINT DEFAULT 0)";
sqlite3_exec( db, sql, 0, 0, &zErrMsg );
regex_t reg ;
regmatch_t pm[1];
char *pattern;
char buf[50];
const size_t nmatch = 1;
//È¡µÃÕýÔò±í´ïʽ£¬²¢½øÐбàÒë
pattern = argv[1];
int result = regcomp(®, pattern, REG_EXTENDED);
//ÖðÐжÁÈ¡Îļþ
while( fgets(buf, sizeof(buf), stdin) )
{
int e = strlen(buf);
if ( e > 0 && buf[e-1] == '\n' )
buf[e-1] = 0;
result = regexec( ®, buf, nmatch, pm, REG_NOTBOL );
if ( result == REG_NOMATCH )
continue;
int i = 0;
for ( i = 0; i < nmatch && pm[i].rm_so != -1; ++i )
{
int code = e - pm[i].rm_so;
printf("×Ö·û\"%s\"µÄ³¤¶ÈΪ:%d\n",buf, e);

char *c = NULL, *a = NULL, *b = NULL , *word = NULL ;
word = (char *)malloc( 50*sizeof(char) );
c = (char *)malloc( 50*sizeof(char) );
a = (char *)malloc( 4*sizeof(char) );
b = (char *)malloc( 4*sizeof(char) );

//ȡһ¸ö×Ö·û´®µÄ×Ó×Ö·û£¬Ç°°ë²¿
strncpy( word, buf, pm[i].r


Ïà¹ØÎĵµ£º

C/C++Ê¥Õ½(¶þ)

ODBCºÍIDAPIÖ®Õù
µ±MicrosoftÔÚÖ𽥵Ļ÷°ÜËûµÄ¾ºÕù¶ÔÊÖ£¬²¢ÇÒÓµÓÐÁ˴󲿷ÝPCÊý¾Ý¿âÊг¡Ö®ºó£¬±ãÂýÂýµÄÁË½âµ½ÕÆÎÕ±ê×¼µÄÖØÒªÐÔ¡£´ËÍâMicrosoftΪÁËͳһ¸÷Ó¦ÓóÌÐòÖ®¼ä²»Í¬×ÊÁϵĴæÈ¡£¬Òò´Ë¿ªÊ¼Öƶ¨´æÈ¡×ÊÁϵÄͳһ±ê×¼-ODBC¡£Microsoft¸ü´óµÄÄ¿µÄÊÇΪÁË×¼±¸ºÍÃé×¼ÏÂÒ»³¡µÄ´óÕ½£¬ÄǾÍÊÇPCÉϵÄRDBMS²úÆ·¡£µ±È»Microsoft Ҫһͳ ......

C/C++Ê¥Õ½£¨Èý£©

¹Ø¼üµÄʱ¿Ì - MFC Or Not
ÔÚSymantec C/C++ºÍWatcom C/C++Öð½¥µØÕ¾ÎÈÁ˽Ų½Ö®ºó£¬ËÄ´ó±àÒëÆ÷¾öÕ½µÄʱ¿ÌÒ²Ö𽥱ƽüÁË¡£ÔÚ1994ÄêδµÄ¾öս֮ǰ£¬SymantecºÍWatcomÍ¬Ê±Ãæ¶ÔÁËÒ»¸ö·Ç³£ÑÏÀ÷µÄ¿¼Ñ飬ÄǾÍÊÇC/C++ FrameworkµÄÑ¡Ôñ¡£ËäÈ»SymantecºÍWatcom¶¼ÒÔ¸÷×ÔµÄÌØÉ«Õ¼µÃÁËÊг¡£¬²»¹ýÔÚµ±Ê±¶ÔÓÚÒ»¸öC/C++¿ª·¢¹¤¾ßÀ´Ëµ£¬×îÖØÒªµÄÒ ......

CºÍÖ¸Õë

CºÍÖ¸Õë
ÔÚCÖÐÓÐÒ»¸öºÜÖØÒªµÄ¸ÅÄ»òÐí´ó¼Ò¶¼ÖªµÀ£¬ÄǾÍÊÇÖ¸Õë¡£Ôںܶà³õѧÕ߸սӴ¥CµÄʱºò¶¼ÈÏΪÕâÊÇ×îÄѵÄ֪ʶµãÁË¡£Ã»´í£¬ÎÒ¸Õ¿ªÊ¼Ñ§µÄʱºòÒ²ÊÇÕâôÏëµÄ£¬ÉÏÁ˵ÚÒ»½Ú¿Îºó£¬µÚÒ»¸ÐÊܾÍÊÇ£ºÌì°¡£¬Õâ¼òÖ±¾ÍÊÇÌìÊ飡ÓÉÓÚ¸öÈ˶ÔÓÚCµÄ°®ºÃ£¬¾­¹ýÒ»¶Îʱ¼äµÄѧϰºÍÑо¿Ö®ºó£¬·¢ÏÖÕâÒ»¿éÊÇÎÒ×îϲ»¶µÄ£¬²¢ÇÒÖð²½·¢ÏÖÕâÒ²ÊDZ¾È赀 ......

extern cµÄ×÷ÓÃ

extern cµÄ×÷Óá¾×ª¡¿
2009-12-18 13:10
1.ÒýÑÔ
C++ÓïÑԵĴ´½¨³õÖÔÊÇ“a better C”£¬µ«ÊÇÕâ²¢²»Òâζ×ÅC++ÖÐÀàËÆCÓïÑÔµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýËù²ÉÓõıàÒëºÍÁ¬½Ó·½Ê½ÓëCÓïÑÔÍêÈ«Ïàͬ¡£×÷ΪһÖÖÓûÓëC¼æÈݵÄÓïÑÔ£¬C++±£ÁôÁËÒ»²¿·Ö¹ý³Ì ʽÓïÑÔµÄÌØµã£¨±»ÊÀÈ˳ÆÎª“²»³¹µ×µØÃæÏò¶ÔÏ󔣩£¬Òò¶øËü¿ÉÒÔ¶¨Òå²»ÊôÓ ......

C/C++Êý×éÃûÓëÖ¸ÕëÇø±ðÉîÈë̽Ë÷

Ö¸ÕëÊÇC/C++ÓïÑÔµÄÌØÉ«£¬¶øÊý×éÃûÓëÖ¸ÕëÓÐÌ«¶àµÄÏàËÆ£¬ÉõÖÁºÜ¶àʱºò£¬Êý×éÃû¿ÉÒÔ×÷ΪָÕëʹÓá£ÓÚÊǺõ£¬ºÜ¶à³ÌÐòÉè¼ÆÕ߾ͱ»¸ãºýÍ¿ÁË¡£¶øÐí¶àµÄ´óѧÀÏʦ£¬ËûÃÇÔÚCÓïÑԵĽÌѧ¹ý³ÌÖÐÒ²´íÎóµÃ¸øÑ§Éú½²½â£º"Êý×éÃû¾ÍÊÇÖ¸Õë"¡£ºÜÐÒÔË£¬ÎҵĴóѧÀÏʦ¾ÍÊÇÆäÖÐÖ®Ò»¡£Ê±ÖÁ½ñÈÕ£¬ÎÒÈÕ¸´Ò»ÈյؽøÐÐ×ÅC/C++ÏîÄ¿µÄ¿ª·¢£¬¶øÉí±ß»¹Ò»Ö±³äÂúÕ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ