CͼÐαà³Ìѧϰ
Ò»¡¢ÆÁÄ»²Ù×÷º¯Êý
1. clrscr()Çå³ý×Ö·û´°¿Úº¯Êý
2. window()×Ö·û´°¿Úº¯Êý
3. gotoxy()¹â±ê¶¨Î»º¯Êý
4. clreol() Çå³ý¹â±êÐÐβ×Ö·ûº¯Êý
5. insline() ²åÈë¿ÕÐк¯Êý
6. delline() ɾ³ýÒ»Ðк¯Êý
7. gettext() ¿½½øÎÄ×Öº¯Êý
8. puttext() ¿½³öÎÄ×Öº¯Êý
9. movetext() Òƶ¯ÎÄ×Öº¯Êý
¶þ¡¢×Ö·ûÊôÐÔº¯Êý
10. textmode() Îı¾Ä£Ê½º¯Êý
11. highvideo()¸ßÁÁ¶Èº¯Êý
12. lowvideo() µÍÁÁ¶Èº¯Êý
13. normvideo(void);
14. textcolor() Îı¾ÑÕÉ«º¯Êý
15. textattr() Îı¾ÊôÐÔº¯Êý
16.textbackground() Îı¾±³¾°º¯Êý
Èý¡¢ ÆÁÏÔ״̬º¯Êý
17. wherex() ¹â±ê´¦x×ø±êº¯Êý
18. wherey() ¹â±ê´¦y×ø±êº¯Êý
19. gettextinfo() »ñÈ¡Îı¾´°¿ÚÐÅÏ¢º¯Êý
ÔÚBorland C++ÀïÃæÌṩÁË×Ö·ûÆÁÄ»ºÍͼÐκ¯Êý¡£×Ö·ûÆÁÄ»µÄºËÐÄÊÇ´°¿Ú(Window)£¬ËüÊÇÆÁÄ»µÄ»î¶¯²¿·Ö£¬×Ö·ûÊä³ö»òÏÔʾÔڻ´°¿ÚÖнøÐС£´°¿ÚÔÚȱʡʱ£¬¾ÍÊÇÕû¸öÆÁÄ»¡£´°¿Ú¿ÉÒÔ¸ù¾ÝÐèÒªÖ¸¶¨Æä´óС¡£Í¬Ñù£¬¶ÔͼÐκ¯ÊýµÄ²Ù×÷£¬Ò²ÌṩÁË(Viewport)¡£Ò²¾ÍÊÇ˵ͼÐκ¯ÊýµÄ²Ù×÷¶¼ÊÇÔÚÊÓ¿ÚÉϽøÐС£Í¼ÐÎÊÓ¿ÚÓë×Ö·û´°¿Ú¾ßÓÐÏàͬµÄÌØÐÔ£¬Óû§¿ÉÒÔÔÚÆÁÄ»É϶¨Òå´óС²»Í¬µÄÊÓ¿Ú£¬Èô²»¶¨ÒåÊÓ¿Ú´óС£¬Ëü¾ÍÊÇÕû¸öÆÁÄ»¡£
´°¿ÚÊÇÔÚ×Ö·ûÆÁĻϵĸÅÄֻÓÐ×Ö·û²ÅÄÜÔÚ´°¿ÚÖÐÏÔʾ³öÀ´£¬ÕâʱÓû§¿ÉÒÔ·ÃÎʵÄ×îСµ¥Î»ÎªÒ»¸ö×Ö·û¡£ÊÓ¿ÚÊÇÔÚͼÐÎÆÁĻ״̬ϵĸÅÄÎı¾ÓëͼÐζ¼¿ÉÒÔÔÚÊÓ¿ÚÉÏÏÔʾ£¬Óû§¿É·ÃÎʵÄ×îСµ¥Î»ÊÇÒ»¸öÏñËØ(ÏñËØÕâÒ»ÊõÓï×î³õÓÃÀ´Ö¸ÏÔʾÆ÷ÉÏ×îСµÄ¡¢µ¥¶ÀµÄ·¢¹âµãµ¥Ôª¡£È»¶øÏÖÔÚ£¬Æ京ÒåÍØ¿íΪָͼÐÎÏÔʾÆ÷ÉϵÄ×îС¿É·ÃÎʵã)¡£
×Ö·ûºÍͼÐÎ״̬Ï£¬ÆÁÄ»ÉϵÄλÖö¼ÊÇÓÉËüÃǵÄÐÐÓëÁÐËù¾ö¶¨µÄ¡£ÓÐÒ»µãÐëÖ¸³ö£º×Ö·û״̬×óÉϽÇ×ø±êΪ(1,1)£¬µ«Í¼ÐÎ×óÉϽÇ×ø±êΪ(0,0)¡£
Á˽â×Ö·ûÆÁÄ»ºÍͼÐκ¯ÊýÓë´°¿ÚºÍÊӿڵĹØϵÊǺÜÖØÒªµÄ¡£ÀýÈ磬×Ö·ûÆÁÄ» ¹â±êλÖú¯Êýgotoxy()½«¹â±êÒƵ½´°¿ÚµÄx,yλÖÃÉÏ£¬Õâδ±ØÊÇÏà¶ÔÓÚÕû¸öÆÁÄ»¡£ÏÂÃæ½éÉܳ£Óõļ¸Àà×Ö·ûÆÁÄ»º¯ÊýµÄ¹¦ÄÜÓÃ;¡¢²Ù×÷·½·¨¼°ÆäÀýÐгÌÐò¡£
Ò»¡¢ÆÁÄ»²Ù×÷º¯Êý
±àд³ÌÐò»æͼ¾³£ÒªÓõ½¶Ô×Ö·ûÆÁÄ»½øÐвÙ×÷¡£ÀýÈ磬ÔÚÍùÆÁÄ»ÉÏд×Ö·û֮ǰ£¬Ê×ÏÈÒª½«ÆÁÄ»Çå³ý¸É¾»¡£ÓÖÈ磬ÓÐʱÐèÒªÔÚÆÁÄ»É϶ദдÉÏÈâÖдÌÑùµÄ×Ö·ûÄÚÈÝ£¬Õâʱ×îºÃÓÃÆÁÄ»¿½±´À´¸ßЧÂʵØÍê³ÉÕâÒ»ÈÎÎñ¡£¶ÔÕâЩ²Ù×÷£¬Borland C++ÌṩÁËһϵÁÐ×Ö·ûÆÁÄ»²Ù×÷º¯ÊýÀ´ÊµÏÖ¡£
1. clrscr()Çå³ý×Ö·û´°¿Úº¯Êý
¹¦ÄÜ£ºº¯Êýclrscr()Çå³ýÕû¸öµ±Ç°×Ö·û´°¿Ú£¬²¢ÇҰѹâ±ê¶¨Î»ÓÚ×óÉϽÇ(1,1)´¦¡£
Ó÷¨£º´Ëº¯Êýµ÷Ó÷½Ê½Î
Ïà¹ØÎĵµ£º
¡¡¡¡Ëã·¨£¨Algorithm£©£º¼ÆËã»ú½âÌâµÄ»ù±¾Ë¼Ïë·½·¨ºÍ²½Öè¡£Ëã·¨µÄÃèÊö£ºÊǶÔÒª½â¾öÒ»¸öÎÊÌâ»òÒªÍê³ÉÒ»ÏîÈÎÎñËù²ÉÈ¡µÄ·½·¨ºÍ²½ÖèµÄÃèÊö£¬°üÀ¨ÐèҪʲôÊý¾Ý£¨ÊäÈëʲôÊý¾Ý¡¢Êä³öʲô½á¹û£©¡¢²ÉÓÃʲô½á¹¹¡¢Ê¹ÓÃʲôÓï¾äÒÔ¼°ÈçºÎ°²ÅÅÕâЩÓï¾äµÈ¡£Í¨³£Ê¹ÓÃ×ÔÈ»ÓïÑÔ¡¢½á¹¹»¯Á÷³Ìͼ¡¢Î±´úÂëµÈÀ´ÃèÊöËã·¨¡£
¡¡¡¡Ò»¡¢¼ÆÊý¡¢ÇóºÍ¡ ......
ÔÚcÖУ¬²ÎÊýĬÈÏÊÇ´«ÖµµÄ£¬¼´ÔÚ²ÎÊýÈëջʱ±»¸´ÖÆÒ»·Ý
¡£ÔÚº¯ÊýÀïÃæÐÞ¸ÄÕâЩ²ÎÊý£¬²»»áÓ°ÏìÍâÃæµÄµ÷ÓÃÕß¡£
ÀýÈç
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void get_str(char * p)
{
p = (char *)malloc(sizeof("abcd"));
s ......
#include <stdio.h>
int Count=0;
void move(char x,int n,char z){
printf(" %d. disk %d: %c => %c\n",++Count,n,x,z);
}//move
// ½«Ëþ×ùxÉÏ°´Ö±¾¶ÓÉСµ½´óÇÒ×ÔÉ϶øϱàºÅΪ1ÖÁnµÄn¸öÔ²ÅÌ°´¹æÔò°áµ½Ëþ×ùzÉÏ£¬y¿ÉÓÃ×÷¸¨ÖúËþ×ù
void Hanoi(int n,char x,char y,char z){
if (n==1) move(x,1,z ......
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/wait.h>
#define QLEN 20
# ......
Êý×éÊÇÀàÐÍÏàͬµÄ¶ÔÏóµÄÐòÁУ¬ÆäÖеĶÔÏó³ÆΪÊý×éÔªËØ¡£Ò²¿ÉÒÔ½«Êý×éÏëÏñ³ÉÒ»Á¬´®µÄÓÃϱêÖµ±àºÅµÄÏàÁÚ´æ´¢Çø¡£
¿ÉÄÜÔÚijЩ±à³ÌÓïÑÔÖУ¬Ò»¸öϱê±äÁ¿ÊDz»ÔÊÐí³¬³öÊý×鶨ÒåÖÐËùÉèµÄ½çÏ޵ġ£µ«ÊÇÔÚCºÍC++ÖУ¬Êý×éÊÇûÓÐÕâÖÖ°²È«´ëÊ©µÄ¡£ÏÂÃæÏÈÀ´¿´¿´Êý×éϱêÔ½½çµÄ¼¸ÖÖÒì³£½á¹û¡£
&nb ......