³¹µ×¸ã¶¨CÖ¸Õ룺¯ÊýÃûÓ뺯ÊýÖ¸Õë
º¯ÊýÃûÓ뺯ÊýÖ¸Õë
º¯Êý´æ·ÅÔÚÄÚ´æµÄ´úÂëÇøÓòÄÚ£¬ËüÃÇͬÑùÓеØÖ·£¬ÎÒÃÇÈçºÎÄÜ»ñµÃº¯ÊýµÄµØÖ·ÄØ£¿
Èç¹ûÎÒÃÇÓÐÒ»¸öint test(int a)µÄº¯Êý£¬ÄÇô£¬ËüµÄµØÖ·¾ÍÊǺ¯ÊýµÄÃû×Ö£¬ÕâÒ»µãÈçͬÊý×éÒ»Ñù£¬Êý×éµÄÃû×Ö¾ÍÊÇÊý×éµÄÆðʼµØÖ·¡£
Ò» ͨ³£µÄº¯Êýµ÷ÓÃ
Ò»¸öͨ³£µÄº¯Êýµ÷ÓõÄÀý×Ó£º
//×ÔÐаüº¬Í·Îļþ
void MyFun(int x); //´Ë´¦µÄÉêÃ÷Ò²¿Éд³É£ºvoid MyFun( int );
int main(int argc, char* argv[])
{
MyFun(10); //ÕâÀïÊǵ÷ÓÃMyFun(10);º¯Êý
return 0;
}
void MyFun(int x) //ÕâÀﶨÒåÒ»¸öMyFunº¯Êý
{
printf(“%d\n”,x);
}
Õâ¸öMyFunº¯ÊýÊÇÒ»¸öÎÞ·µ»ØÖµµÄº¯Êý£¬Ëü²¢²»Íê³ÉʲôÊÂÇé¡£ÕâÖÖµ÷Óú¯ÊýµÄ¸ñʽÄãÓ¦¸ÃÊǺÜÊìϤµÄ°É£¡¿´Ö÷º¯ÊýÖе÷ÓÃMyFunº¯ÊýµÄÊéд¸ñʽ£º
MyFun(10);
ÎÒÃÇÒ»¿ªÊ¼Ö»ÊÇ´Ó¹¦ÄÜÉÏ»òÕß˵´ÓÊýѧÒâÒåÉÏÀí½âMyFunÕâ¸öº¯Êý£¬ÖªµÀMyFunº¯ÊýÃû´ú±íµÄÊÇÒ»¸ö¹¦ÄÜ£¨»òÊÇ˵һ¶Î´úÂ룩¡£
Ö±µ½——
ѧϰµ½º¯ÊýÖ¸Õë¸ÅÄîʱ¡£ÎҲŲ»µÃ²»ÔÚ˼¿¼£ºº¯ÊýÃûµ½µ×ÓÖÊÇʲô¶«Î÷ÄØ£¿
£¨²»ÒªÒÔΪÕâÊÇûÓÐʲôÒâÒåµÄÊÂàÞ£¡ºÇºÇ£¬¼ÌÐøÍùÏ¿´Äã¾ÍÖªµÀÁË¡££©
¶þ º¯ÊýÖ¸Õë±äÁ¿µÄÉêÃ÷
¾ÍÏóijһÊý¾Ý±äÁ¿µÄÄÚ´æµØÖ·¿ÉÒÔ´æ´¢ÔÚÏàÓ¦µÄÖ¸Õë±äÁ¿ÖÐÒ»Ñù£¬º¯ÊýµÄÊ×µØÖ·Ò²ÒÔ´æ´¢ÔÚij¸öº¯ÊýÖ¸Õë±äÁ¿ÀïµÄ¡£ÕâÑù£¬ÎҾͿÉÒÔͨ¹ýÕâ¸öº¯ÊýÖ¸Õë±äÁ¿À´µ÷ÓÃËùÖ¸ÏòµÄº¯ÊýÁË¡£
ÔÚCϵÁÐÓïÑÔÖУ¬ÈκÎÒ»¸ö±äÁ¿£¬×ÜÊÇÒªÏÈÉêÃ÷£¬Ö®ºó²ÅÄÜʹÓõġ£ÄÇô£¬º¯ÊýÖ¸Õë±äÁ¿Ò²Ó¦¸ÃÒªÏÈÉêÃ÷°É£¿ÄÇÓÖÊÇÈçºÎÀ´ÉêÃ÷ÄØ£¿ÒÔÉÏÃæµÄÀý×ÓΪÀý£¬ÎÒÀ´ÉêÃ÷Ò»¸ö¿ÉÒÔÖ¸ÏòMyFunº¯ÊýµÄº¯ÊýÖ¸Õë±äÁ¿FunP¡£ÏÂÃæ¾ÍÊÇÉêÃ÷FunP±äÁ¿µÄ·½·¨£º
void (*FunP)(int) ; //Ò²¿Éд³Évoid (*FunP)(int x);
Äã¿´£¬Õû¸öº¯ÊýÖ¸Õë±äÁ¿µÄÉêÃ÷¸ñʽÈçͬº¯ÊýMyFunµÄÉêÃ÷´¦Ò»Ñù£¬Ö»²»¹ý——ÎÒÃÇ°ÑMyFun¸Ä³É£¨*FunP£©¶øÒÑ£¬ÕâÑù¾ÍÓÐÁËÒ»¸öÄÜÖ¸ÏòMyFunº¯ÊýµÄÖ¸ÕëFunPÁË¡££¨µ±È»£¬Õâ¸öFunPÖ¸Õë±äÁ¿Ò²¿ÉÒÔÖ¸ÏòËùÓÐÆäËü¾ßÓÐÏàͬ²ÎÊý¼°·µ»ØÖµµÄº¯ÊýÁË¡££©
Èý ͨ¹ýº¯ÊýÖ¸Õë±äÁ¿µ
Ïà¹ØÎĵµ£º
C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
1. registerbgidriverº¯Êý
registerbgidriverº¯ÊýµÄ¹¦ÄÜÊǵǼÒÑÁ¬½Ó½øÀ´µÄͼÐÎÇý¶¯³ÌÐò´úÂ룬ÆäÓ÷¨Îª£ºint registerbgidriver(void(*driver)(void ......
C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
1. setallpalletteº¯Êý
setallpalletteº¯ÊýµÄ¹¦ÄÜÊÇ°´Ö¸¶¨·½Ê½¸Ä±äËùÓеĵ÷É«°åÑÕÉ«£¬ÆäÓ÷¨Îª£ºvoid far setallpallette(struct palette, fa ......
C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
1. setwritemodeº¯Êý
setwritemodeº¯ÊýµÄ¹¦ÄÜÊÇÉèÖÃͼÐη½Ê½Ï»ÏßµÄÊä³öģʽ£¬ÆäÓ÷¨Îª£ºvoid far setwritemode(int mode);³ÌÐòʵÀýÈçÏ£º
#include < ......
ת×Ô£º http://hi.baidu.com/elliott_hdu/blog/item/411421dd5bf8dfe977c63876.html
1.ÏÂÁгÌÐòµÄÊä³ö½á¹ûΪ£º(B)
#include<iostream.h>
void main()
{
char* a[ ] = { "hello", "the", "world"};
char** pa = a;
&nbs ......
ÒýÑÔ
¡¡¡¡Ö¸ÕëÊÇC/C++ÓïÑÔµÄÌØÉ«£¬¶øÊý×éÃûÓëÖ¸ÕëÓÐÌ«¶àµÄÏàËÆ£¬ÉõÖÁºÜ¶àʱºò£¬Êý×éÃû¿ÉÒÔ×÷ΪָÕëʹÓá£ÓÚÊǺõ£¬ºÜ¶à³ÌÐòÉè¼ÆÕ߾ͱ»¸ãºýÍ¿ÁË¡£¶øÐí¶àµÄ´óѧÀÏʦ£¬ËûÃÇÔÚCÓïÑԵĽÌѧ¹ý³ÌÖÐÒ²´íÎóµÃ¸øѧÉú½²½â£º"Êý×éÃû¾ÍÊÇÖ¸Õë"¡£ºÜÐÒÔË£¬ÎҵĴóѧÀÏʦ¾ÍÊÇÆäÖÐÖ®Ò»¡£Ê±ÖÁ½ñÈÕ£¬ÎÒÈÕ¸´Ò»ÈյؽøÐÐ×ÅC/C++ÏîÄ¿µÄ¿ª·¢£¬¶øÉí±ß» ......