c++ console graphics
c++ console graphics
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
Login