From: Jack on
Hello,
I recall that once I wrote a little program that
could limit the number of characters the field could contain. I vaguely
recall something that looks like "getnline();" But I couldn't find it from
google and MSDN.
Any reminder?
Thanks
Jack


From: Ulrich Eckhardt on
Jack wrote:
> I recall that once I wrote a little program that
> could limit the number of characters the field could contain.

I have no idea what you're talking about here and what DOS has to do with
that, but I'll try guessing from the part below:

> I vaguely recall something that looks like "getnline();" But I couldn't
> find it from google and MSDN.

There is fgets() in C. Further, there is gets(), but that should never be
used anyway. In C++, you could also use the std::getline() function and
then truncate the result or use std::istream's readsome() member.

Cheers!

Uli

--
C++ FAQ: http://parashift.com/c++-faq-lite

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
From: Jack on
Say I had a textbox Name:_______
The user can type into box, after he has typed up to 6 characters, he would
not be allowed to continue and
the PC starts beeping... etc
Thanks
Jack


From: Ulrich Eckhardt on
Jack wrote:
> Say I had a textbox Name:_______
> The user can type into box, after he has typed up to 6 characters, he
> would not be allowed to continue and
> the PC starts beeping... etc

The probably widest-spread library to create graphical UIs in a text screen
is called "curses". There are various flavours and variants of that
library, but you should be able to find one that suits you with that name.

Uli

--
C++ FAQ: http://parashift.com/c++-faq-lite

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932