Hey guys, if I want to read a string of characters (say letters or numbers) from a file one at a time, and have them assigned individually to a global "String" variable, what's the best/easiest way to do this?
I've tried google-ing for ways of reading from a file, but none of the examples I've used want to compile correctly, or the ones that will compile assign the input character an integer value when I'd like to keep it a char or string of length 1 if possible.
If I'm overlooking something really stupid (very possible) as to why I'm not able to get my file to be read correctly please let me know. Generally what I'm trying to do is read the string from the file one character at a time, and will then take action depending on what that character evaluates to.
Thanks for any help/suggestions,
Ryan P.
I've tried google-ing for ways of reading from a file, but none of the examples I've used want to compile correctly, or the ones that will compile assign the input character an integer value when I'd like to keep it a char or string of length 1 if possible.
If I'm overlooking something really stupid (very possible) as to why I'm not able to get my file to be read correctly please let me know. Generally what I'm trying to do is read the string from the file one character at a time, and will then take action depending on what that character evaluates to.
Thanks for any help/suggestions,
Ryan P.
