Well, I'm not perfect at making pictures, also i can't make it look like a window, but it's console window, I hope you know what I mean :)
Anyway. I want it to have an area separated by '-' or maybe line(i just don't know how to create one).
It should look a bit like my picture; you can see anything that program outputs in game window(for example "Welcome to my first RPG game" or "You see troll"), and your commands are written in "commands" section(and this section doesn't move at all). My main problem is this section. I don't know how to make one, and than make it not moveable, so when you write your commands game window updates, but commands area just clears itself(so when you type for example "go", it doesn't stay there, obviousely). Is there any way I can do that, or achieve something close enough to use it?
Doing what you want is a surprisingly black art. Fortunately, the Curses library (google NCurses and PDCurses, depending on your OS) has stuff that does just that.
All your console I/O needs to go through the Curses methods, though. (Which is reasonable.)
@Lynx876 - the problem with your idea(if i understand what you did there) is that user will see area with command going up, so if he scrolls up, he can see that it stayed there - and I want to avoid it(no clearscreen though).
I'll check Curses library, looks like I'm gonna have much more work doing it, but it's surely worth it. Thanks for help.
> I'll check Curses library, looks like I'm gonna have much more work doing it, but it's surely worth it.
Yes, learning to use curses is certainly worthwhile. But your aim is: 'I want to test my programming skills(and also learn few things), so I decided to create text-based Role-playing game in c++'. So do it in two steps.
In the first phase, focus on the logic of the game that you want to write, and nothing else; C++ skills without screen management getting in the way. Use a fixed size memory buffer to simulate the screen; for instance std::vector<std::string> screen( 25U, std::string(80U,' ') ) ; for an 80x25 screen. Perform all output to this abstract screen (use a std::ostringstream where required) and when you want to display it, copy it to std::cout. Run the program in a console sized to 80X25. It will scroll, but other than that will provide fixed command area that you want.
Once you have got this first part working correctly, port it to use curses, with all the associated bells and whistles. You might want to consider using a C++ wrapper library over curses - for instance NDK++ http://ndk-xx.sourceforge.net