Hi,
I just started a program containing every single prog we have done for school so far and added some private stuff.
Searching through my older files I found a prog which lists all Integers between 1 and 255 and their respective ASCII char, so I decided to include it into my 'collection'.
The problem is that 'twas a Win32 executable and we're working under DOS. Well actually this wouldn't be much of a problem, but the script seems no to work under DOS.
Well, first of here's the script:
# include <iostream.h>
# include <conio.h>
main()
{
int i, j, ip, ipp;
float k, l;
char zeichen;
for (i=1;i<=254;i++)
{
zeichen=i;
cout<<"\n"<<i<<" - "<<zeichen;
j=1;
for (j=1;j<=25;j++)
{
k=1.0*i/20;
l=1.0*j;
if (k==l)
{
ip=i+1;
ipp=i+20;
if (i<=240) cout<<"\n\n(Press any key --> "<<ip<<" to "<<ipp<<" )";
getch();
clrscr();
};
}
}
getch();
}
As I stated, no problems under Win32, but under DOS it stops at 26 and after pressing a key again the screen gets cleared again and stays black.
So my question is..is there any way to get something like this running under DOS?
I tried a simple "cin>>intvar; charvar=intvar; cout<<charvar;" aswell, but any value above 25 simply results in nothing being put out.
Well, thanks in advance.~