Is there any problem with this code?
<pre><code>#include&lt;iostream&gt;
#include&lt;fstream&gt;
#include&lt;cstring&gt;

using namespace std;

int main()
{
    cout &lt;&lt; "Hello.";

    ifstream attack,output;

    attack.open("CattackList");
    output.open("finaltestOutput.txt");

    if (!attack)
        cout &lt;&lt; "file1 not opened.\n";
    if (!output)
        cout &lt;&lt; "file2 not opened.\n";

    char buf1[100],buf2[100];
    attack.getline(buf1,100);

    int count = 0, C=0;

    cout &lt;&lt; "hello";

    while (!attack.eof())
    {
        C++;

        cout &lt;&lt; "ok";

        output.open("finaltestOutput");

        while (!output.eof())
        {
            output.getline(buf2, 80);
            if (strncmp(buf1, buf2, 51) == 0)
            {
                cout &lt;&lt; buf2 &lt;&lt; endl;
                count++;
            }
        }
        attack.getline(buf1, 80);
    }
    cout &lt;&lt; "\nTotal Attacks : " &lt;&lt; C &lt;&lt; endl;
    cout &lt;&lt; "Attacks detected: " &lt;&lt; count &lt;&lt; endl;
    return 0;
}
</code></pre>

<p>I am not able to get even the first "Hello" to get printed...</p>
