•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 401,971 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,842 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 6916 | Replies: 11
•
•
Join Date: Sep 2004
Posts: 11
Reputation:
Rep Power: 4
Solved Threads: 0
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:
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.~
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.~
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the C Forum
- Previous Thread: need little help bout this...
- Next Thread: how to place a specific info from input file



Threaded Mode