Cº¯Êý×Öµä
@1$×Ö·ûÆÁÄ»º¯Êý Turbo C2.0µÄ×Ö·ûÆÁÄ»º¯ÊýÖ÷Òª°üÀ¨Îı¾´°¿Ú´óСµÄÉ趨¡¢´°¿ÚÑÕÉ«µÄÉèÖᢠ´°¿ÚÎı¾µÄÇå³ýºÍÊäÈëÊä³öµÈº¯Êý¡£ 1.Îı¾´°¿ÚµÄ¶¨Òå Turbo C2.0ĬÈ϶¨ÒåµÄÎı¾´°¿ÚΪÕû¸öÆÁÄ», ¹²ÓÐ80ÁÐ(»ò40ÁÐ)25ÐеÄÎı¾ µ¥Ôª, ÿ¸öµ¥Ôª°üÀ¨Ò»¸ö×Ö·ûºÍÒ»¸öÊôÐÔ, ×Ö·û¼´ASCII Âë×Ö·û, ÊôÐԹ涨¸Ã×Ö ·ûµÄÑÕÉ«ºÍÇ¿¶È¡£ Turbo C2.0¿ÉÒÔ¶¨ÒåÆÁÄ»ÉϵÄÒ»¸ö¾ØÐÎÓò×÷Ϊ´°¿Ú, ʹÓÃwindow()º¯Êý¶¨Òå¡£ ´°¿Ú¶¨ÒåÖ®ºó, ÓÃÓйش°¿ÚµÄÊäÈëÊä³öº¯Êý¾Í¿ÉÒÔÖ»ÔÚ´Ë´°¿ÚÄÚ½øÐвÙ×÷¶ø²»³¬ ³ö´°¿ÚµÄ±ß½ç¡£ window()º¯ÊýµÄµ÷ÓøñʽΪ: void window(int left, int top, int right, int bottom); ¸Ãº¯ÊýµÄÔÐÍÔÚconio.h ÖÐ (¹ØÓÚÎı¾´°¿ÚµÄËùÓк¯ÊýÆäÍ·Îļþ¾ùΪconio.h, ºóÃæ²»ÔÙ˵Ã÷)¡£ º¯ÊýÖÐÐÎʽ²ÎÊý(int left, int top)ÊÇ´°¿Ú×óÉϽǵÄ×ø±ê, (int right, int bottom)ÊÇ´°¿ÚµÄÓÒϽÇ×ø±ê, ÆäÖÐ(left, top)ºÍ(right, bottom) ÊÇÏà¶ÔÓÚÕû¸öÆÁÄ»¶øÑԵġ£ Turbo C 2.0¹æ¶¨Õû¸öÆÁÄ»µÄ×óÉϽÇ×ø±êΪ (1, 1), ÓÒϽÇ×ø±êΪ(80, 25)¡£²¢¹æ¶¨ÑØˮƽ·½ÏòΪ XÖá, ·½Ïò³¯ÓÒ; ÑØ´¹Ö± ·½ÏòΪ YÖá, ·½Ïò³¯Ï¡£Èôwindow()º¯ÊýÖеÄ×ø±ê³¬¹ýÁËÆÁÄ»×ø±êµÄ½çÏÞ, Ôò´° ¿ÚµÄ¶¨Òå¾ÍʧȥÁËÒâÒå, Ò²¾ÍÊÇ˵¶¨Ò彫²»Æð×÷ÓÃ, µ«³ÌÐò±àÒëÁ´½Óʱ²¢²»³ö´í¡£ ÁíÍâ, Ò»¸öÆÁÄ»¿ÉÒÔ¶¨Òå¶à¸ö´°¿Ú, µ«ÏÖÐд°¿ÚÖ»ÄÜÓÐÒ»¸ö(ÒòΪDOSΪµ¥ÈÎ Îñ²Ù×÷ϵͳ), µ±ÐèÒªÓÃÁíÒ»´°¿Úʱ, ¿É½«¶¨Òå¸Ã´°¿ÚµÄwindow() º¯ÊýÔÙµ÷ÓÃÒ» ´Î, ´Ëʱ¸Ã´°¿Ú±ã³ÉΪÏÖÐд°¿ÚÁË¡£ ÈçÒª¶¨ÒåÒ»¸ö´°¿Ú×óÉϽÇÔÚÆÁÄ»(20, 5)´¦, ´óСΪ30ÁÐ15ÐеĴ°¿Ú¿Éд³É: window(20, 5, 50, 25); 2. Îı¾´°¿ÚÑÕÉ«µÄÉèÖà Îı¾´°¿ÚÑÕÉ«µÄÉèÖðüÀ¨±³¾°ÑÕÉ«µÄÉèÖúÍ×Ö·ûÑÕÉ«µÄÉèÖÃ, ʹÓõĺ¯Êý¼° Æäµ÷ÓøñʽΪ: ÉèÖñ³¾°ÑÕÉ«: void textbackground(int color); ÉèÖÃ×Ö·ûÑÕÉ«: void textcolor(int color); ÓйØÑÕÉ«µÄ¶¨Òå¼û±í1¡£ ±í1. ÓйØÑÕÉ«µÄ¶¨Òå ©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥©¥ ·ûºÅ³£Êý ÊýÖµ º¬Òå ×Ö·û»ò±³¾
Ïà¹ØÎĵµ£º
http://en.wikipedia.org/wiki/C_preprocessor
C preprocessor
from Wikipedia, the free encyclopedia
Jump to:navigation, search
The C preprocessor (cpp) is the preprocessor for the C programming language. In many C implementations, it is a separate program invoked by the compiler as the first part ......
#include<stdio.h>
#define N 8
void input(int n,int p[N][N])
{
int i,j;
for(i=0;i<n;i++)
{
printf("please input the %d line:\n",i+1);
for(j=0;j<n;j++)
{
scanf("%d",&p[i][j]);
}
}
}
void output(int n,int p[N][N])
......
1. ÔõÑù½¨Á¢ºÍÀí½â·Ç³£¸´ÔÓµÄÉùÃ÷£¿ÀýÈ綨ÒåÒ»¸ö°üº¬N ¸öÖ¸Ïò·µ»ØÖ¸Ïò×Ö·ûµÄÖ¸ÕëµÄº¯ÊýµÄÖ¸ÕëµÄÊý×飿
Õâ¸öÎÊÌâÖÁÉÙÓÐÒÔÏÂ3 ÖÖ´ð°¸:
1. char *(*(*a[N])())();
2. ÓÃtypedef Öð²½Íê³ÉÉùÃ÷:
typedef char *pc; /* ×Ö·ûÖ¸Õë*/
typedef pc fpc(); /* ·µ»Ø×Ö·ûÖ¸ÕëµÄº¯Êý*/
typedef fpc *pfpc; /* ÉÏÃ溯ÊýµÄÖ¸Õë*/ ......
ÔÖø£ºAndrew Koenig - AT&T Bell Laboratories Murray Hill, New Jersey 07094
·Ò룺lover_P
0 ¼ò½é
CÓïÑÔ¼°ÆäµäÐÍʵÏÖ±»Éè¼ÆΪÄܱ»×¨¼ÒÃÇÈÝÒ×µØʹÓá£ÕâÃÅÓïÑÔ¼ò½à²¢¸½Óбí´ïÁ¦¡£µ«ÓÐһЩÏÞÖÆ¿ÉÒÔ±£»¤ÄÇЩ¸¡ÔêµÄÈË¡£Ò»¸ö¸¡ÔêµÄÈË¿ÉÒÔ´ÓÕâЩÌõ¿îÖлñµÃһЩ°ïÖú¡£
&nbs ......
´ÓijλÍøÓѵIJ©¿Í¿´µ½¹ØÓÚextern "C"Ó÷¨µÄÎÄÕ£¬½²µÃ·Ç³£Í¸³¹£¬ÓÚÊǾÍÕª³ÁËÎÒ֮ǰ²»ÉõÁ˽âµÄ²¿·Ö×ö¸öbackup¡£
Ò»¡¢´ÓCÓëC++±àÒëÁ¬½Ó·½Ê½ÉîÈëÀí½âextern "C"
<1>.CºÍC++¶Ôº¯ÊýµÄ´¦Àí·½Ê½ÊDz»Í¬µÄ.±»extern "C"ÐÞÊεıäÁ¿ºÍº¯ÊýÊÇ°´ÕÕCÓïÑÔ·½Ê½±àÒëºÍÁ¬½ÓµÄ.extern "C"ÓÃÓÚʵÏÖC++ÓëC¼°ÆäËüÓïÑԵĻìºÏ±à³Ì¡ ......