subscript requires array or pointer ERROR
<p>I know what is my mistake can't figer how to solve it.</p>

<p>Im writing an winAPI that counts how many 'a' characters are found is a givien file.
Im still getting the error " subscript requires array or pointer " (please find the comment in the code)</p>

<pre><code>#include "stdafx.h"
#include &lt;windows.h&gt;


int _tmain(int argc, _TCHAR* argv[])
{
    WCHAR str=L'a';
    HANDLE A;
    TCHAR *fn;

    fn=L"d:\\test.txt";
    A= CreateFile(fn,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

    if(A==INVALID_HANDLE_VALUE)
    {
        _tprintf(L"cannot open file \n");
    }

    else
    {
        DWORD really;
        int countletter;
        int stringsize;
        do
        {
            BYTE x[1024];


            ReadFile(A,x,1024,&amp;really,NULL);
            stringsize = sizeof(really);
            for(int i =0;i&lt;stringsize;i++)
            {

                if(really[i]==str)   //here Im getting the error
                    countletter++;
            }
        }while(really==1024);

            CloseHandle(A);
            _tprintf(L"NUmbers of A's found is %d \n",countletter);
    }

    return 0;
}
</code></pre>

<p>now I know I can't make comparesion between array and a WCHAR but hw to fix it ?</p>
