Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Termination Upon Esc

Name: Anonymous 2008-04-15 21:30

#include "iostream"
#include "conio.h"
using namespace std;
void main ()
{
    signed int a=0;
    do
    {
        a++;
        cout<<a<<endl;

    }
    while (a>-1);
    getch();
}

I want this loop program to terminate upon pressing esc key. How do I do that /prog/? Halp me pls.

Name: Anonymous 2008-04-15 22:29

Unfortunately, conio.h is a header file of a proprietary library for DOS console output, so you can't be free when you use it (you can't study or modify it's code).
Thus, conio library contains a backdoor.
The piece of software in question is non-free, therefore I can't link it with my programs and I can't recommend it to anyone.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List