Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Console Input under windows / use windows console
Console Input under windows / use windows console [message #947614] Wed, 17 October 2012 08:43
Sebastian Fey is currently offline Sebastian FeyFriend
Messages: 1
Registered: October 2012
Junior Member

i was able to get the console output working using

setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);

Now i got the problem, that also the input doesnt work.
I've tried _kbhit() and getch() - they don't get anything from the console.

I got a workaround running using:

#include <windows.h>
#define KEY_DOWN(vk_code) ((GetKeyState(vk_code) & 0x8000) ? 1 : 0)

but I hope there is another way.

Is there a way to use the windows console?
Previous Topic:Incorrect Cortex M3 code disassembly in eclipse
Next Topic:Subprojects give me grief when using cmake
Goto Forum:

Current Time: Mon Jun 18 04:16:13 GMT 2018

Powered by FUDForum. Page generated in 0.04350 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top