Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

I need some assistance with an ifstream and getline in C++, I am reading a string of characters from a file, replacing certain characters using a switch statement and then writing them back to another file. The current statement I use to read the input stream into a char[256] array is: inputstream>>contents[counter] where contents is the char variable. Obviously with this method spaces in the input stream is not read, how can I replace this using getline? Thanks!!

OpenStudy (anonymous):

please elaborate.I couln't get ur point

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!