Karl Ebener wrote:
Hi!
There is nothing in standard C++ to help you.
Mostly because standard C++ is not aware of a keyboard.
All input or output is generalized to a stream.
But that doesn't mean that it can't be done on your
specific system. All it means is that there is no
general solution. You need system specific functionality
to do that.
Could you give me a hint for Linux systems? I looked but didn't find
anything....
Another question: Is there a way to make a function return a list?
e.g.
int[] abc() { //*returning list*}
You can return arrays, but doing so requires you to use new[] and
delete[] and deal with the memory management yourself.
A much better idea would be to use "vector" or "list", which are classes
provided by c++ which are much easier to deal with than plain arrays.
Look them up in any good (or even most bad) C++ books :)
Chris