Pre {border-style: solid; border-width: 1px; border-color: #000; line-Height: 1; color: #3c65d1; Background-color: # 1e1e1e; font-size: 16px ;}. sysfunc {color: #2d8000; font-style: italic; font-weight: bold ;}. selffuc {color: # f3e191 ;}. bool {color: # f6ac77 ;}. condition {color: #008080; font-weight: bold ;}. key {color: # ffc057 ;}. vaR {color: #61 AFBA; font-style: italic ;}. digit {color: #008000; font-weight: bold ;}. includepre {color: #3c65d1 ;}. operator_d {color: # ff00ff; font-weight: bold ;}. operator_x {color: # 65ec0f; font-weight: bold ;}
Function Name :? Wherex?
?? Yes :? Return the horizontal cursor position in the window?
Use ?? Method :? Int? Wherex (void );?
Program example :?
#include?<conio.h>?int?main(void)?{????clrscr();????gotoxy(10,10);????cprintf("Current?location?is?X:?%d??Y:?%d\r\n",?wherex(),?wherey());????getch();????return?0;?}???????
Function Name :? Wherey?
?? Yes :? Return the Vertical cursor position in the window?
Use ?? Method :? Int? Wherey (void );?
Program example :?
#include?<conio.h>?int?main(void)?{????clrscr();????gotoxy(10,10);????cprintf("Current?location?is?X:?%d??Y:?%d\r\n",?wherex(),?wherey());????getch();????return?0;?}???????
Function Name :? Window?
?? Yes :? Define the active text mode window?
Use ?? Method :? Void? Window (Int? Left ,? Int? Top ,? Int? Right ,? Int? Bottom );?
Program example :?
#include?<conio.h>?int?main(void)?{????window(10,10,40,11);????textcolor(BLACK);????textbackground(WHITE);????cprintf("This?is?a?test\r\n");????return?0;?}???????
Function Name :? Write?
?? Yes :? Write to a file?
Use ?? Method :? Int? Write (Int? Handel ,? Void? * Buf ,? Int? Nbyte );?
Program example :?
#include?<stdio.h>?#include?<stdlib.h>?#include?<fcntl.h>?#include?<sys\stat.h>?#include?<io.h>?#include?<string.h>?int?main(void)?{????int?handle;????char?string[40];????int?length,?res;????/*?????Create?a?file?named?"TEST.$$$"?in?the?current?directory?and?write?????a?string?to?it.??If?"TEST.$$$"?already?exists,?it?will?be?overwritten.????*/????if?((handle?=?open("TEST.$$$",?O_WRONLY?|?O_CREAT?|?O_TRUNC,??????????????????????????S_IREAD?|?S_IWRITE))?==?-1)????{???????printf("Error?opening?file.\n");???????exit(1);????}????strcpy(string,?"Hello,?world!\n");????length?=?strlen(string);????if?((res?=?write(handle,?string,?length))?!=?length)????{???????printf("Error?writing?to?the?file.\n");???????exit(1);????}????printf("Wrote?%d?bytes?to?the?file.\n",?res);????close(handle);????return?0;?}??????????
Used in this article? Calligraphy and painting novel software? Released, the content has nothing to do with the software, and the painting and calligraphy novel software? More comfortable reading, more comfortable writing, and easier Publishing.
W. xml