[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

gotoxy in dev c++

furqan shaikh

11/22/2008 6:32:00 AM

sir how can we use gotoxy() in dev c++ as we do in TC++ . if it is not
present then what is the way to make our own.

by using the combination of ascii codes. to move througout the screen.
13 Answers

Paavo Helde

11/22/2008 7:51:00 AM

0

furqan shaikh <furqan64@gmail.com> kirjutas:

> sir how can we use gotoxy() in dev c++ as we do in TC++ . if it is not
> present then what is the way to make our own.
>
> by using the combination of ascii codes. to move througout the screen.

Standard C++ does not include such things. A good approach would be to use
some portable library, like ncurses.

Paavo


utab

11/22/2008 1:04:00 PM

0

On Sat, 22 Nov 2008 01:51:19 -0600, Paavo Helde wrote:

> furqan shaikh <furqan64@gmail.com> kirjutas:
>
>> sir how can we use gotoxy() in dev c++ as we do in TC++ . if it is not
>> present then what is the way to make our own.
>>
>> by using the combination of ascii codes. to move througout the screen.
>
> Standard C++ does not include such things. A good approach would be to
> use some portable library, like ncurses.
>
> Paavo

In addition, if the ultimate goal is to draw a 2D graph, using GnuPlot is
a better option... there are even some C++ classes freely available on
the net to interface it to your code.

red floyd

11/22/2008 6:17:00 PM

0

furqan shaikh wrote:
> sir how can we use gotoxy() in dev c++ as we do in TC++ . if it is not
> present then what is the way to make our own.
>
> by using the combination of ascii codes. to move througout the screen.

Wrong group. gotoxy() is not standard C++.

Jorgen Grahn

11/22/2008 10:09:00 PM

0

On Sat, 22 Nov 2008 14:03:46 +0100, utab <umut.tabak@gmail.com> wrote:
> On Sat, 22 Nov 2008 01:51:19 -0600, Paavo Helde wrote:
>
>> furqan shaikh <furqan64@gmail.com> kirjutas:
>>
>>> sir how can we use gotoxy() in dev c++ as we do in TC++ . if it is not
>>> present then what is the way to make our own.
>>>
>>> by using the combination of ascii codes. to move througout the screen.
>>
>> Standard C++ does not include such things. A good approach would be to
>> use some portable library, like ncurses.

This is offtopic, but ncurses isn't portable to Windows, which furquan
apparently uses.

> In addition, if the ultimate goal is to draw a 2D graph, using GnuPlot is

It seems unlikely that he wants to draw graphs; there's nothing about
in the question which suggests that is what he wants to do.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!

Default User

11/23/2008 7:53:00 AM

0

Jorgen Grahn wrote:


> This is offtopic, but ncurses isn't portable to Windows, which furquan
> apparently uses.

I have no personal experience with it, but sourceforge lists an ncurses
for Windows project.

<http://gnuwin32.sourceforge.net/packages/ncurs...



Brian

--
If televison's a babysitter, the Internet is a drunk librarian who
won't shut up.
-- Dorothy Gambrell (http://cata...)

James Kanze

11/23/2008 2:12:00 PM

0

On Nov 22, 2:03 pm, utab <umut.ta...@gmail.com> wrote:
> On Sat, 22 Nov 2008 01:51:19 -0600, Paavo Helde wrote:
> > furqan shaikh <furqa...@gmail.com> kirjutas:

> >> sir how can we use gotoxy() in dev c++ as we do in TC++ .
> >> if it is not present then what is the way to make our own.

> >> by using the combination of ascii codes. to move througout
> >> the screen.

> > Standard C++ does not include such things. A good approach
> > would be to use some portable library, like ncurses.

> In addition, if the ultimate goal is to draw a 2D graph, using
> GnuPlot is a better option... there are even some C++ classes
> freely available on the net to interface it to your code.

I'm not sure what gotoxy() did in TC++, but if it is anything
like the gotoxy() in curses (and "using the combination of ASCII
codes to move throughout the screen" certainly suggests that it
is something similar), then it's not used to draw 2D graphs, but
to position the cursor on the screen. This sort of thing used
to be frequently used to generate masks for input and such. (In
modern code, one would normally use a GUI. But there's still a
lot of mask based code around that needs to be maintained.)

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

James Kanze

11/23/2008 2:24:00 PM

0

On Nov 22, 11:09 pm, Jorgen Grahn <grahn+n...@snipabacken.se> wrote:
> On Sat, 22 Nov 2008 14:03:46 +0100, utab <umut.ta...@gmail.com> wrote:
> > On Sat, 22 Nov 2008 01:51:19 -0600, Paavo Helde wrote:

> >> furqan shaikh <furqa...@gmail.com> kirjutas:

> >>> sir how can we use gotoxy() in dev c++ as we do in TC++ .
> >>> if it is not present then what is the way to make our own.

> >>> by using the combination of ascii codes. to move througout
> >>> the screen.

> >> Standard C++ does not include such things. A good approach
> >> would be to use some portable library, like ncurses.

> This is offtopic, but ncurses isn't portable to Windows, which
> furquan apparently uses.

ncurses is an implementation of the Open Group curses standard
(http://www.opengroup.org/onlinepubs/007908799/cur...).
I don't know about ncurses, precisely, but there definitely have
been ports of some implementations of this standard to MS-DOS.
(I've used them.) And since it normally operates in a console
window, presumably, some of the DOS ports will probably work
under Windows as well. (Some of them probably used direct
access to the screen backing memory, which of course won't work
under Windows. But at least one of them required installing the
ANSI driver, obviously so that it wouldn't need direct screen
access.)

I'm too lazy (or not interested enough---yeh, that sounds
better) to do it now, but there is a port of nethack to windows,
and nethack uses the basic curses, so you might want to see what
they use or how they do it.

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

James Kanze

11/23/2008 2:25:00 PM

0

On Nov 22, 7:16 pm, red floyd <no.spam.h...@example.com> wrote:
> furqan shaikh wrote:
> > sir how can we use gotoxy() in dev c++ as we do in TC++ . if
> > it is not present then what is the way to make our own.

> > by using the combination of ascii codes. to move througout
> > the screen.

> Wrong group.  gotoxy() is not standard C++.

But it's portable C++. For what it does, it could probably be
considered a defacto standard. (Strictly speaking, it's
standard, and it's C++. It's just that the standard in question
isn't the C++ standard:-).)

--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Thomas Dickey

11/23/2008 2:35:00 PM

0

On Nov 23, 2:53 am, "Default User" <defaultuse...@yahoo.com> wrote:
> Jorgen Grahn wrote:
> > This is offtopic, but ncurses isn't portable to Windows, which furquan
> > apparently uses.
>
> I have no personal experience with it, but sourceforge lists an ncurses
> for Windows project.
>
> <http://gnuwin32.sourceforge.net/packages/ncurs...

The listing is inaccurate - there is no such package
(par for the course for SourceForce projects).

--
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-...
ftp://invisible-...


Thomas Dickey

11/23/2008 7:31:00 PM

0

On Nov 23, 2:23 pm, James Kanze <james.ka...@gmail.com> wrote:
> On Nov 22, 11:09 pm, Jorgen Grahn <grahn+n...@snipabacken.se> wrote:
>
> > On Sat, 22 Nov 2008 14:03:46 +0100, utab <umut.ta...@gmail.com> wrote:
> > > On Sat, 22 Nov 2008 01:51:19 -0600, Paavo Helde wrote:
> > >> furqan shaikh <furqa...@gmail.com> kirjutas:
> > >>> sir how can we use gotoxy() in dev c++ as we do in TC++ .
> > >>> if it is not present then what is the way to make our own.
> > >>> by using the combination of ascii codes. to move througout
> > >>> the screen.
> > >> Standard C++ does not include such things. A good approach
> > >> would be to use some portable library, like ncurses.
> > This is offtopic, but ncurses isn't portable to Windows, which
> > furquan apparently uses.
>
> ncurses is an implementation of the Open Group curses standard
> (http://www.opengroup.org/onlinepubs/007908799/cur...).
> I don't know about ncurses, precisely, but there definitely have
> been ports of some implementations of this standard to MS-DOS.
> (I've used them.)  And since it normally operates in a console

PDCurses is the best-known implementation for MS-DOS (though there
probably have been some others, it's been quite a while since I've
seen even the non-working fragments of alternatives ;-).

In principle, one could port ncurses to Windows, but so far there's
been enough work to do...

--
Thomas E. Dickey
http://invisible-...
ftp://invisible-...