Does anybody know what conio.h and toupper() do. If you de please tell me. Also if anybody has a good craps program they would like to share please tell me.
Does anybody know what conio.h and toupper() do. If you de please tell me. Also if anybody has a good craps program they would like to share please tell me.
Well, the toupper converts the text entered to uppercase letters. Conio.h is a header file that contains the getch command. It contains more then that but I'm not sure about the other commands.
This information comes from my compiler, you should try with the "help" from yours.
conio.h contains the next functions:
cgets clreol clrscr cprintf
cputs cscanf delline getch
getche getpass gettext gettextinfo
gotoxy highvideo insline inp
inport inportb inpw kbhit
lowvideo movetext normvideo outp
outport outportb outpw putch
puttext _setcursortype textattr textbackground
textcolor textmode ungetch wherex
wherey window/* _toupper example */
#include <string.h> #include <stdio.h> #include <ctype.h>
int main(void) {
int length, i;
char *string = "this is a string.";
length = strlen(string);
for (i = 0; i < length; i++) {
if ((string[i] >= 'a') && (string[i] <= 'z')){
string[i] = _toupper(string[i]);
}
}
printf("%s\n",string);
return 0;
}