help needed with text analyzis

This is a discussion on help needed with text analyzis within the C++ Programming forums, part of the General Programming Boards category; Got a program code so far to:
Code:
#include <string>
#include <fstream>
#include <iomanip>
#include <iostream>
using namespace std;
//----------------------------------------------------------------------------
...

I need it to delete words that are made of two numerals and which sum is less or equal to 9. (basicaly if its 18/15/71 it deletes that word, if its 91 it wont because its more than 9). Think im pretty much done getting program to do so, theres a problem - If there's more than 1 word that meets my criteria in single line, program returns only last word from that line to analyzis.txt while i need it to return every single one of it.. Any ideas?

Alright then, what am I supposed to change/do so program returns all the words it deleted to analyzis file? Since im getting only last one of single row right now, and is there any alternative for atoi?