ファイルが特定の場所にあるときに、fstream がファイルに書き込めないという問題があります。次のコードでは、コメント行のコメントを外すとファイルが書き込まれますが、コメントするとファイルはまったく書き込まれません。コンソール出力の束を追加しましたが、「outputFile << newWord << endl;」の周りの両方の出力が表示されます。完了しますが、ファイルが実際に書き込まれることはありません。
void write_index( string newWord )
{
fstream outputFile( "H:\\newword.txt", ios::app );
int same = 0;
string currWord;
currWord.resize(5);
//outputFile << newWord << endl;
while( !outputFile.eof() )
{
    getline( outputFile, currWord );
    cout << "Checking if " << newWord << "is the same as " << currWord << endl;
    if( newWord == currWord )
    {
        cout << "It is the same" << endl;
        same = 1;
        break;
    }
}
if( same != 1 )
{
    cout << "Writing " << newWord << "to file" << endl;
    outputFile << newWord << endl;
    cout << "Done writing" << endl;
}
outputFile.close();
}