I want to create pseudo-wordstar/turboc++ like GUI... Anyone got an idea on how to do this? I can't find the right library for it.
I'n using dev c++ and can't use graphics.h
I want to create pseudo-wordstar/turboc++ like GUI... Anyone got an idea on how to do this? I can't find the right library for it.
I'n using dev c++ and can't use graphics.h
There's no real portable way to move about the screen in DOS, so the best bet for you on Dev-C++ is most likely windows.h. I believe they have a gotoxy() implementation for you to use, otherwise, I would say conio.h, which Dev-C++ doesn't have a full version of, so you'd have to go fishing the internet for that gotoxy() implementation. If you want non console UI, then you'll have to look for a free graphics library online.
Last edited by SlyMaelstrom; 06-11-2006 at 03:59 AM.
Sent from my iPadŽ
http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
You can get a port of curses for dev-c++
http://devpaks.org/details.php?devpak=5
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
You can also use Conio2. It adds to minGW's implementation of conio.
EDIT: Edited after I noticed Salem's post.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
I've never used CURSES. I think I'll try it seeing as to how promoted it is.
Sent from my iPadŽ
Gotoxy:
I dug this up from a site somewhere. It should work if you don't already have gotoxy().Code:#include <windows.h> void gotoxy(int x, int y) { COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition( GetStdHandle(STD_OUTPUT_HANDLE), coord); }
Code:#include <stdio.h> void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){ puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9 /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i] ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][ t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}