Çë½Ì¹ØÓÚpython¼°pygameǶÈëC++µÄÎÊÌâ
ÎÒÃǵÄÏîÄ¿ÐèÒªÔÚmfcÖбàÒëpython½Å±¾²¢Éú³ÉexeÎļþ£¬Òò´ËÐèÒªÔÚ³ÌÐòÖÐǶÈëpython½âÊÍÆ÷£¬Í¬Ê±ÓÉÓÚÓõÄpygameÄ£¿é£¬Ò²ÐèҪһͬ¼ÓÈë½øÈ¥¡£ÎÒÒѾ±àÒëÁËpythonÔ´Îļþ£¬ÓпâÎļþºÍdllÎļþ£¬µ«ÊÇpygame²»ÖªµÀÔõô¼Ó½øÈ¥¡£pygameµÄrelease°æµÄsrcÎļþ¼ÐÖÐÓÐһЩcÎļþ£¬°²×°µ½pythonÖÐÓм¸¸ösdlµÄdllÎļþ£¬includeÖÐÓÐÍ·Îļþ¡£ÏëÇë½ÌÒ»ÏÂÔõô°ÑpygameÄ£¿é¼Ó½øÈ¥ÄØ£¿
up Çë´ó¼Ò°ïæÏëÏ룬¾ÍÊÇ°ÑpythonǶÈëc++ʱÔõô°Ñ²»ÊôÓÚ±ê×¼¿âµÄÄ£¿éÒ²¼Ó½øÈ¥ ¶àлÁË Äã¿ÉÒÔÖ±½ÓÔڽű¾ÎļþÀïÃæ import pygame ¾Í¿ÉÒÔÁË°¡ ÊÇÏëÕâÑù£¬µ«ÊÇÔÚmfcÖÐǶÈëµÄpython½âÊÍÆ÷²¢Ã»Óаüº¬pygameµÄÄ£¿é£¬Ö±½ÓÔڽű¾ÖÐдµÄ»°¿ÉÄÜÕÒ²»µ½Õâ¸öÄ£¿é°É£¬Õⲿ·Ö²»ÖªµÀÔõô´¦Àí¡£ÒýÓà ÊÇÏëÕâÑù£¬µ«ÊÇÔÚmfcÖÐǶÈëµÄpython½âÊÍÆ÷²¢Ã»Óаüº¬pygameµÄÄ£¿é£¬Ö±½ÓÔڽű¾ÖÐдµÄ»°¿ÉÄÜÕÒ²»µ½Õâ¸öÄ£¿é°É£¬Õⲿ·Ö²»ÖªµÀÔõô´¦Àí¡£ ÄãµÄ·¾¶ÉèÖà ¶Ô²»¶Ô£¿ ÄãÔÚCÀïÃæÖ±½ÓÓÃimport pygame£¬Ðв»ÐУ¿ Py_Initialize(); PyRun_SimpleString("import sys"); PyRun_SimpleString("sys.path.append('..... PyRun_SimpleString("import pygame ... ¸Ðл¥ÉÏ£¡ÎÒÔÚvs2003µÄmfc¹¤³ÌÖмÓÈëpythonÍ·ÎļþºóÔÚÒ»¸öÊÓͼµÄ³õʼ»¯º¯ÊýÖмÓÈë Py_Initialize(); PyRun_SimpleString("import pygame"); PyRun_SimpleString("pygame.init()"); Py_Finalize(); ±àÒë²»»á±¨´
Ïà¹ØÎÊ´ð£º
QQȺ 29152388 ÓÑÇéUP °ï¶¥ up °ïup up Ö§³Ö£¡ up jf ...ÄѵÀÓзÖ..? up up up Ï£ÍûÓеüӷ֣¬¹þ¹þ¡£ Ö§³Ö£¬ÎÒ¼ÓÁË£¬Ï£ÍûÂ¥Ö÷ÄܼÓÎÒ£¬¹²Í¬Ñ§Ï°¹þ ¼ÓÁË¡£ ¶¥ÉÏ£¬Ã¿ÌìÊÕ»ñÒ»µã£¬Ö§³Ö ......
ÇëÎʸ÷λ¸ßÊÖÈçºÎÓÃC/C++»ñµÃϵͳδ°²×°²¹¶¡ ºÃÏñºÜרҵµÄ¶«Î÷¡£¡£¡£ ²é×¢²á±í ÿ¸ö²¹¶¡Èç¹û°²×°Á˶¼»áÔÚ×¢²á±íÀïÃæµÇ¼Ç ÇëÎÊÄܲ»ÄܸüÇåÎúЩ£¬ÎÒÏëÓÃc\c++²é³öÀ´£¬²»ºÃÒâ˼£¬ÎÒÊÇÐÂÊÖ¡£»¹ÍûÖ¸½Ì¡£Ð» ·ÖÖµ ......
ÒÔǰѧ¹ýÌ·ºÆÇ¿µÄÊ飬ÈÏÕæ¿´¹ý¼¸±é£¬ÊéÉϵÄÌâ´ó²¿·Ö×Ô¼º±à¹ý£¬ÏÖÔÚÏë½øÒ»²½Ñ§Ï°C£¬Ó¦¸Ã´ÓÄÄ·½Ãæ×ÅÊÖÄØ£¿ÎÒ×¼±¸¿´CÓëÖ¸Õ룬´ó¼Ò¾õµÃÕâ±¾ÊéÔõôÑù£¿»¹ÊÇ¿´ÆäËüµÄÊ飿 ÄãÓ¦¸ÃÖØÐÂÕÒ¡¶c primer plus¡·Õâ±¾Êé¿´¿´¡£ c ......
linux ÏÂC±à³Ì ¼¯³É¿ª·¢»·¾³ ÓÃʲô±È½ÏºÃ ÎÒ³õ²½Ñ¡¶¨ codeblock ºÇºÇ »¹ÓÐ ÔÚlinux дÁËÒ»¸ö´òÓ¡ÖÐÎĵĴúÂ룬¶ø½ñÌìÔÚwindows ϲ鿴ÄǸö´úÂë £¬ ÊÇÂÒÂë ¶øºóÏëµ½ÏÈÓà EditPlusÏȽøÐб༠Ȼºó¸´ÖÆ ......
´úÂëÌ«¶à£¬²»ºÃÌù£¬ ´óÖÂÉæ¼°µ½ÕâЩ£º char *arg[MAXSIZE]; char *buffer[MAXSIZE]; ......... arg[k]=(char*)malloc(sizeof(char)*j); strcpy(arg[k],buffer); .................[color=#993300][/color] µ ......