C±ê×¼¿âÔ´Âë½âÆÊ(14)£ºÍ¨Óú¯Êýstdlib.h
ͨÓú¯Êý¿âÔÚÍ·Îļþstdlib.hÖÐÉùÃ÷£¬±È½ÏÅÓ´ó£¬Ö÷Òª·ÖΪÒÔϼ¸´óÀࣺ´æ´¢·ÖÅä¡¢Ëæ»úÊýÉú³É¡¢Êý×Öת»»ÓëÕûÐÍÔËËã¡¢³ÌÐòÍ˳öÓë»·¾³Í¨ÐÅ¡¢ËÑË÷ÓëÅÅÐò¡¢¶à×Ö½ÚÓë¿í×Ö·ûµÄת»»¡£ÓÉÓÚ¼³¼°µ½´æ´¢·ÖÅä¡¢»·¾³Í¨Ðŵȣ¬Òò´ËËüÃǵĴó¶àÊýÒ²ÒÀÀµÓÚ²Ù×÷ϵͳ¡£glibcÖУ¬Í¨Óú¯Êý¿âµÄºËÐÄʵÏÖÔÚstdlibºÍmallocÁ½¸öĿ¼Ï¡£
stdlib.hÖе¼³öµÄËùÓбê×¼½Ó¿ÚÈçÏ£º
1¡¢malloc,calloc,realloc,free£ºÄÚ´æ·ÖÅäÓëÊÍ·Å¡£·ÖÅäµÄÄÚ´æ²»½øÐÐÈκγõʼ»¯£¬±£Ö¤¶ÔÈκÎÊý¾ÝÀàÐÍÕýÈ·¶ÔÆë
2¡¢rand,srand,RAND_MAX£º²úÉúαËæ»úÊý£¬rand·¶Î§µÄÉÏÏÞÓÉRAND_MAXÖ¸¶¨£¬ÖÁÉÙΪ32767
3¡¢atof,atoi,atol,atoll£º½«×Ö·û´®µÄ³õʼ²¿·Öת»»³ÉÏàÓ¦ÀàÐ͵ÄÊý×Ö¡£
4¡¢strtod,strtof,strtold,strtol,strtoll,strtoul,strtoull£ºÍ¬ÉÏ£¬µ«±ÈÉÏÃæµÄת»»º¯Êý¸üÍêÉÆ¡£Êµ¼ÊÉÏglibcÖУ¬ÉÏÃæµÄ¼¸¸öת»»º¯Êý¶¼ÊÇÖ±½Óµ÷ÓÃÕâÀïµÄº¯ÊýÀ´ÊµÏֵġ£
5¡¢abort,atexit,exit,_Exit,EXIT_FAILURE,EXIT_SUCCESS£ºÖÕÖ¹³ÌÐò¡£exitÔÚÖÕֹǰ»áµ÷ÓÃÓÃatexit×¢²áµÄ¸÷¸öº¯Êý£¬¶øabortºÍ_ExitÔò²»»á¡£
6¡¢getenv£º·µ»ØÖ¸¶¨»·¾³²ÎÊýnameµÄ¶ÔÓ¦Öµ¡£
7¡¢system£º½«×Ö·û´®²ÎÊý´«µÝµ½²Ù×÷ϵͳµÄshellÖУ¬°´ÊµÏÖ¶¨ÒåµÄÖ´ÐÐËü¡£
8¡¢qsort,bsearch£ºqsort¶Ôº¬ÓÐcount¸öÔªËØ(ÿ¸öÔªËصĴóСΪsize)µÄÊý×ébase°´ÉýÐòÅÅÐò¡¢bsearchÔÚÊý×éÖÐËÑË÷ÔªËØkey¡£
9¡¢abs,labs,llabs£º·µ»Ø²ÎÊýµÄ¾ø¶ÔÖµ¡£
10¡¢div,ldiv,lldiv£º¼ÆËãn³ýÒÔdµÄÉ̺ÍÓàÊý£¬·ÅÔÚdiv_t,ldiv_t,lldiv_t½á¹¹Öзµ»Ø£¬½á¹¹ÖеijÉÔ±quot=n/d£¬³ÉÔ±rem=n%d¡£
11¡¢mblen,mbtowc,wctomb,MB_CUR_MAX£ºÅжÏsµÄÇ°n¸ö×Ö½ÚÊÇ·ñÊÇÓÐЧµÄ¶à×Ö½Ú×Ö·û¡¢¶à×Ö½Ú×Ö·ûsת»»³É¿í×Ö·ûpwc¡¢¿í×Ö·ûpwcת»»³É¶à×Ö½Ú×Ö·ûs¡¢ MB_CUR_MAX±íʾ¶à×Ö½Ú×Ö·ûµÄ×î´ó×Ö½ÚÊý¡£
12¡¢mbstowcs,wcstombs£º¶à×Ö½Ú×Ö·û´®Óë¿í×Ö·û´®Ö®¼äµÄת»»£¬·µ»Øת»»ºóµÄ×Ö·ûÊý(²»°üÀ¨nullÖÕÖ¹·û)£¬·¢ÏÖ´íÎóÔò·µ»Ø-1(ת»»³Ésize_t)¡£
Ïà¹ØÎĵµ£º
externÊÇC/C++ÓïÑÔÖбíÃ÷º¯ÊýºÍÈ«¾Ö±äÁ¿×÷Ó÷¶Î§£¨¿É¼ûÐÔ£©µÄ¹Ø¼ü×Ö.
Ëü¸æËß±àÒëÆ÷£¬ÆäÉùÃ÷µÄº¯ÊýºÍ±äÁ¿¿ÉÒÔÔÚ±¾Ä£¿é»òÆäËüÄ£¿éÖÐʹÓá£
1¡£¶ÔÓÚextern±äÁ¿À´Ëµ£¬½ö½öÊÇÒ»¸ö±äÁ¿µÄÉùÃ÷£¬Æä²¢²»ÊÇÔÚ¶¨Òå·ÖÅäÄÚ´æ¿Õ¼ä¡£Èç¹û¸Ã±äÁ¿¶¨Òå¶à´Î£¬»áÓÐÁ¬½Ó´íÎó
2¡£Í¨³££¬ÔÚÄ£¿éµÄÍ·ÎļþÖжԱ¾Ä£¿éÌṩ¸øÆäËüÄ£¿éÒýÓõĺ¯ÊýºÍÈ«¾Ö ......
linux Ï ÓÃcÓïÑÔ´´½¨mysqlÊý¾Ý¿â±Ê¼Ç£¨Ò»£©
£££££½öΪ¸öÈËѧϰժҪ£¬²¢²»¶Ï¸üÐÂÖС£¡£¡£¡£
ÔÚÒýÓÃÍ·Îļþʱ±ØÐë°üº¬‘mysql.h’µÄÍ·Îļþ(±ØÐëÊÇmysql.hµÄ¾ø¶ÔµØÖ·£¬Ò»°ãÔÚmysqlϵÄincludeĿ¼Ï£¬×Ðϸ¿´¿´ÄãµÄÔÚÄÄÀ*),
ÎÒÊÇubuntu9¡£04£¬ÔÚ/usr/include/mysql/mysql ......
1. »ù±¾½âÊÍ
¡¡¡¡typedefΪCÓïÑԵĹؼü×Ö£¬×÷ÓÃÊÇΪһÖÖÊý¾ÝÀàÐͶ¨ÒåÒ»¸öÐÂÃû×Ö¡£ÕâÀïµÄÊý¾ÝÀàÐÍ°üÀ¨ÄÚ²¿Êý¾ÝÀàÐÍ£¨int,charµÈ£©ºÍ×Ô¶¨ÒåµÄÊý¾ÝÀàÐÍ£¨structµÈ£©¡£
¡¡¡¡ÔÚ±à³ÌÖÐʹÓÃtypedefÄ¿µÄÒ»°ãÓÐÁ½¸ö£¬Ò»¸öÊǸø±äÁ¿Ò»¸öÒ×¼ÇÇÒÒâÒåÃ÷È·µÄÐÂÃû×Ö£¬ÁíÒ»¸öÊǼò»¯Ò»Ð©±È½Ï¸´ÔÓµÄÀàÐÍÉùÃ÷¡£
¡¡¡¡ÖÁÓÚtypedefÓÐʲô΢ÃîÖ®´ ......
ÓÉÓÚBoost Python¸ú²»ÉÏPython°æ±¾¸üУ¬ÈçÏ·½·¨µ÷ÓÿÉÄܲúÉúTypeError: 'NoneType' object does not support item assignmentÒì³£¡£
Boost PythonÎĵµÖÐÀý×Ó¿ÉÄܲúÉúÒì³£¡£
Py_Initialize();
object main_module = import("__main__");
object main_dict = main_module.attr("__dict__");
try{
object ......
JavaÓïÑÔ±¾Éí¾ßÓпçƽ̨ÐÔ£¬Èç¹ûͨ¹ýJavaµ÷ÓÃDLLµÄ¼¼Êõ·½±ãÒ×Óã¬Ê¹ÓÃJava¿ª·¢Ç°Ì¨½çÃæ¿ÉÒÔ¸ü¿ìËÙ£¬Ò²ÄÜ´øÀ´¿çƽ̨ÐÔ¡£
Javaµ÷ÓÃC/C++дºÃµÄDLL¿âʱ£¬ÓÉÓÚ»ù±¾Êý¾ÝÀàÐͲ»Í¬¡¢Ê¹ÓÃ×Ö½ÚÐòÁпÉÄÜÓвîÒ죬ËùÒÔÔÚ²ÎÊý´«µÝ¹ý³ÌÖÐÈÝÒ׳öÏÖÎÊÌ⣬DLLÖпÉÄÜÐèÒª×öÏàÓ¦µÄת»»¡£
ʹÓÃJavaµ÷ÓÃDLL¶¯Ì¬Á´½Ó¿âµÄ·½°¸Í¨³£ÓÐÈýÖÖ£ºJNI, Ja ......