delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/11/12:55:33

From: ams AT ludd DOT luth DOT se (Martin Str|mberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: <conio.h> gotoxy() and simple ascii text graphics
Date: 11 Jul 1999 07:09:20 GMT
Organization: University of Lulea, Sweden
Lines: 38
Message-ID: <7m9fv0$8sm$2@news.luth.se>
References: <7m9ba2$mh7$1 AT nnrp1 DOT deja DOT com>
NNTP-Posting-Host: queeg.ludd.luth.se
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

BWilliams (jitenderji AT my-deja DOT com) wrote:
: //////////////////////////////////////////////////////
: #include <conio.h>
: #include <iostream.h>
: 
: int main()
:    {
:    clrscr();
:    for(int column = 1; column <= 10; column++)
:       for(int row = 1; row <= 5; row++)
:          { gotoxy(column, row);
:            cout << "|"; }
:    return (1);
:    }
: //////////////////////////////////////////////////////
: 
: This code snippet should, I believe, produce the following:
: 
: ||||||||||
: ||||||||||
: ||||||||||
: ||||||||||
: ||||||||||
: 
: However, what I am seeing instead is the cursor moving through the (x,
: y) coordinates, and then when it's gone through all the loops, it
: prints out all of the "|"s in one long line.
: 
: This has got to be something simple that I haven't been able to figure
: out.  Any ideas?  Can I even do this sort of programming in DJGPP for
: running in a DOS console on a Windows 9X system?

Read the FAQ. It's in section 9.4.


Skunk Anansie, Paranoid & Sunburnt,

							MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019