G
Guest
This code:
---snip---
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <conio.h>
int _tmain(int argc, _TCHAR* argv[])
{
bool bQuit=false;
printf("Press ESC to quit.\n");
while(!bQuit)
{
if(kbhit())
{
if(getch()==27)
{
bQuit=true;
};
};
};
printf("done.\n");
return 0;
}
---snap---
leaks like there's no tomorrow in VS8b2 CPP debug console builds.
One would think that there's no that much that can go wrong with kbhit().
Release builds are ok.
---snip---
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include <tchar.h>
#include <conio.h>
int _tmain(int argc, _TCHAR* argv[])
{
bool bQuit=false;
printf("Press ESC to quit.\n");
while(!bQuit)
{
if(kbhit())
{
if(getch()==27)
{
bQuit=true;
};
};
};
printf("done.\n");
return 0;
}
---snap---
leaks like there's no tomorrow in VS8b2 CPP debug console builds.
One would think that there's no that much that can go wrong with kbhit().
Release builds are ok.