Sign in to follow this  
Yohomyth

[solved] ReadConsole

Recommended Posts

I'm trying to use ReadConsole, but the result is always madness!! #define MAX_INPUT 256 ReadConsole( hInputConsole, szInput, MAX_INPUT, NULL, NULL ); When i WriteConsole szInput, it just looks like a bunch of =======================================22222 or something. is there something strange to know about ReadConsole, or is there a better Win32 function out there? SOLVED: the fourth parameter can't be NULL

Share this post


Link to post
Share on other sites
Quote:
Original post by Yohomyth
Is there something strange to know about ReadConsole, or is there a better Win32 function out there?


This might not be suited to your program, but whenever I need to use the console, I declare two std::fstreams:


std::ifstream conin("CONIN$");
std::ofstream conout("CONOUT$");


Which achieves the same result, but using the STL. It results in me having to do less work, which is always good [grin].

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this