Okay, I've kind of figured out how to take a char array and convert it to a string, but I'm having one problem. I'm using a char array of size 20, but when I convert an array with less than 20 characters I get the string followed by garbage. Like this:
word = temp;//temp is filled with input at this point ex:The
^^^^^this statement gives me:
So my question is how can I just convert the valid contents of the char array to the string instead of the garbage too.