reserve() is meant for situations where you know the total size of the STL object you are working with, and in the process of getting to that point you would normally be reallocating memory lots of times. For example: concatenating a string one letter at a time when you know the word is going to be 15 letters long. You would use reserve so it would allocate the memory all at one time. At least that is what I have taken from it.

Quote:

It worked up until it got to what was in int l.

So do you mean doing this would fix it:

if(str.length()> length)

I'd like to see more code to see why reserve is crashing. The full class and how it is being used would be nice.

=-----===-----===-----=I like signatures that only the signer would understand. Inside jokes are always the best, because they exclude everyone else.

I didn't write the code for text input but it seems to work well, 100 x better then gstream anyway.

It's kinda hard to explain, once you go beyond the max amount of characters it looks like it's laggy almost, but you can still backspace.. It's just difficult sometimes (have to hold in backspace or press it a bunch of times.)

Well, just something I can use to make it stop clear_keybuf(). I tried to find different things but nothing seems to work very well.. Someone suggested just to make the text code stop polling whenever you reach the max text limit, which I CAN do though I just want to find a different way.

Sorry sometimes my head isn't screwed on properly. That seems to work very, VERY nicely.. I guess as long as I'm not getting any errors, and as long as the program isn't acting funky and/or crashing it'll be fine.