c++ console graphics
c++ console graphics
hi there coders this is George, i've been working on a payroll project and i'm finding difficulty in my c++ console graphics. any one with any idea how to go about it?
you know a class for console graphics or guidelines on how to go about it. i've been seeing some documentation on gotoxy(int x, int y) but i really do not know how to use it.
*
i'm also thinking about how to control my keyboard input. you know stopping the keyboard from appearing on the console and display something simultaneously like ( password -> ********)
*
3 Jul 08, 9:04PM
Hi, this reply is probably a bit late. But what exactly do you mean by console graphics?
I assume your not developing using the Windows GUI, but instead you're to create you application to display everything through a text based terminal/console window. In which case you want to reposition to cursor in order to write text at various points, as in:
#include <conio.h> #include <stdio.h> int main(void) { int i; printf("This is the first line.\n"); gotoxy(10,4); printf("This is the second line.\n"); gotoxy(20,8); printf("And this is line 3.\n"); return 0; }As for the password. You should look into functions like reference:getc or getch (depending on your compiler). If you wrap this into a loop, as in
while(1) { char key=getc(); putchar(key); // use putchar('*') for passwords. if(key==13) break; }that should hopefully do what you need