Very basic question, hoped it'd be in an FAQ under some sort of "handy tip" heading.. not so.
Anyway, so I have a while loop of some description, a string is read in, I analyse it's contents and act accordingly.
At the end of this loop, I want to clear the string, something along the lines of making every character null. Short of an extremely inelegant embedded loop to do just that, what's the handy expert shortcut? one of those things you do one way because it's the most efficient and applies everytime the situation arises.. Any takers?
Setting the first character to null isn't quite the solution i'm looking for, either. I can post some more specific code if required, because I have some that's not working as I'd like it to, but a general solution to the above problem may fix it.
Anyway, so I have a while loop of some description, a string is read in, I analyse it's contents and act accordingly.
At the end of this loop, I want to clear the string, something along the lines of making every character null. Short of an extremely inelegant embedded loop to do just that, what's the handy expert shortcut? one of those things you do one way because it's the most efficient and applies everytime the situation arises.. Any takers?
Setting the first character to null isn't quite the solution i'm looking for, either. I can post some more specific code if required, because I have some that's not working as I'd like it to, but a general solution to the above problem may fix it.