Help with the console window

Started by
4 comments, last by Ronnie TRFC 16 years, 2 months ago
Hello, I'm making a very simple game in a 3D environment using a engine provided by my tutor. However there is a point in my game where the player needs to input text but the game engine does not support text input. Therefore i think i am going to have to use the console window for the player to enter text into. Is it possible to call up the console window when i require the player to enter the text; for the player to then enter the text which will do something and then for the console window to close. Hope that makes sense. Thanks in advance. Ronnie. EDIT: Sorry i forgot to add that i am working with Microsoft Visual Studio using C++.
Advertisement
You can bring up a console window with AllocConsole() and destroy it with FreeConsole(). This won't help if your application is fullscreen, however.
you can take a look at AllocConsole which will create a console window that you can use for input/output
Thanks for the quick reply.

I've justed tried using AllocConsole() but i get an error:

'Identifier not found'

Any ideas?

Thankyou.
To use AllocConsole() include windows.h/
Thanks alot mate.

Worked a charm.

This topic is closed to new replies.

Advertisement