If I use functions like gotoxy(), clrscr(), _setcursortype(),...... in my programs and then compile it, the programs don't run on other computers only on mine. I'm using borland c++ builder 6.
Thanks
If I use functions like gotoxy(), clrscr(), _setcursortype(),...... in my programs and then compile it, the programs don't run on other computers only on mine. I'm using borland c++ builder 6.
Thanks
When you use compiler-specific extensions, you shouldn't expect your code to compile on another implementation.
My best code is written with the delete key.
You can implement those non-standard functions with Win32 ones and get it to compile under Dev-C++ or something however. The FAQ has a Win32 implementation of clrscr() I believe, and you should be able to find others if you search the board.
The only compiler I know of that has _setcursortype() is DJGPP. DJGPP has a ScreenSetCursor() function which is the same as gotoxy() (although I think it's one-based; the upper left corner is (1,1), not (0,0)) and clrscr(), too. You could try compiling with it: http://delorie.com/djgpp. But I don't know what that would gain you: it's a DOS compiler, just like borland c++. It would run on the same platforms.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.