函數(shù)名: textbackground
創(chuàng)新互聯(lián)為您提適合企業(yè)的網(wǎng)站設計?讓您的網(wǎng)站在搜索引擎具有高度排名,讓您的網(wǎng)站具備超強的網(wǎng)絡競爭力!結(jié)合企業(yè)自身,進行網(wǎng)站設計及把握,最后結(jié)合企業(yè)文化和具體宗旨等,才能創(chuàng)作出一份性化解決方案。從網(wǎng)站策劃到做網(wǎng)站、成都網(wǎng)站設計, 我們的網(wǎng)頁設計師為您提供的解決方案。
功 能: 選擇新的文本背景顏色
用 法: void textbackground(int color);
程序例:
#include conio.h
int main(void)
{
int i, j;
clrscr();
for (i=0; i9; i++)
{
for (j=0; j80; j++)
cprintf("C");
cprintf("\r\n");
textcolor(i+1);
textbackground(i);
}
return 0;
}
函數(shù)名: textcolor
功 能: 在文本模式中選擇新的字符顏色
用 法: void textcolor(int color);
程序例:
#include conio.h
int main(void)
{
int i;
for (i=0; i15; i++)
{
textcolor(i);
cprintf("Foreground Color\r\n");
}
return 0;
C語言不存在背景色,C語言的編譯器可以更換背景色,各種不同的編譯器更換背景色的方法不同,需要參考其幫助文件,一般是在編輯環(huán)境設置中。
conio.h是一個控制臺模式下控制輸出的頭文件.
它聲明幾個函數(shù),如果你用到這些函數(shù)就要加上此頭文件了。
函數(shù)如下:
textbackground(color)//設置文本的背景顏色
clrscr()//清屏,(常用)
gotoxy()//定位
textcolor(color);//設置文本顏色
getch()//輸入字符不可見。
---回答完畢。
--------下面是conio.h內(nèi)容--供參考----------------
/***
*conio.h - console and port I/O declarations
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for
* the MS C V2.03 compatible console I/O routines.
*
* [Public]
*
****/
#if _MSC_VER 1000
#pragma once
#endif
#ifndef _INC_CONIO
#define _INC_CONIO
#if !defined(_WIN32) !defined(_MAC)
#error ERROR: Only Mac or Win32 targets supported!
#endif
#ifndef _MAC
#ifdef __cplusplus
extern "C" {
#endif
/* Define _CRTIMP */
#ifndef _CRTIMP
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* _CRTIMP */
/* Define __cdecl for non-Microsoft compilers */
#if ( !defined(_MSC_VER) !defined(__cdecl) )
#define __cdecl
#endif
/* Define _CRTAPI1 (for compatibility with the NT SDK) */
#ifndef _CRTAPI1
#if _MSC_VER = 800 _M_IX86 = 300
#define _CRTAPI1 __cdecl
#else
#define _CRTAPI1
#endif
#endif
/* Function prototypes */
_CRTIMP char * __cdecl _cgets(char *);
_CRTIMP int __cdecl _cprintf(const char *, ...);
_CRTIMP int __cdecl _cputs(const char *);
_CRTIMP int __cdecl _cscanf(const char *, ...);
_CRTIMP int __cdecl _getch(void);
_CRTIMP int __cdecl _getche(void);
#ifdef _M_IX86
int __cdecl _inp(unsigned short);
unsigned short __cdecl _inpw(unsigned short);
unsigned long __cdecl _inpd(unsigned short);
#endif /* _M_IX86 */
_CRTIMP int __cdecl _kbhit(void);
#ifdef _M_IX86
int __cdecl _outp(unsigned short, int);
unsigned short __cdecl _outpw(unsigned short, unsigned short);
unsigned long __cdecl _outpd(unsigned short, unsigned long);
#endif /* _M_IX86 */
_CRTIMP int __cdecl _putch(int);
_CRTIMP int __cdecl _ungetch(int);
#if !__STDC__
/* Non-ANSI names for compatibility */
_CRTIMP char * __cdecl cgets(char *);
_CRTIMP int __cdecl cprintf(const char *, ...);
_CRTIMP int __cdecl cputs(const char *);
_CRTIMP int __cdecl cscanf(const char *, ...);
#ifdef _M_IX86
int __cdecl inp(unsigned short);
unsigned short __cdecl inpw(unsigned short);
#endif /* _M_IX86 */
_CRTIMP int __cdecl getch(void);
_CRTIMP int __cdecl getche(void);
_CRTIMP int __cdecl kbhit(void);
#ifdef _M_IX86
int __cdecl outp(unsigned short, int);
unsigned short __cdecl outpw(unsigned short, unsigned short);
#endif /* _M_IX86 */
_CRTIMP int __cdecl putch(int);
_CRTIMP int __cdecl ungetch(int);
#endif /* __STDC__ */
#ifdef __cplusplus
}
#endif
#endif /* _MAC */
#endif /* _INC_CONIO */
----------------------------------------------
網(wǎng)頁名稱:c語言中dround函數(shù)的簡單介紹
新聞來源:http://chinadenli.net/article4/hpejie.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、網(wǎng)站維護、外貿(mào)建站、移動網(wǎng)站建設、、域名注冊
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)