i am using Dev C++ on windows xp
#include #include #include using namespace std; int main () { string S
If you change your loop to
while(getline(infile,STRING)) { cout<
you avoid the possibility of reading the last value twice (see this SO post).