C++ Phising code : Hi I need some help with my c++ phising code. I got it to work but not as what i intended. When I run the code it scans my text file i inputted and only output one of the words in the text file that match the array in my code and when i add other words to the text file that is in the array it gives me a error.


    
    #include <fstream>
    #include <iostream>
    #include <cmath>
    #include <iomanip>


    #define SIZE 30
    using namespace std;



    const char *Phish[SIZE] ={"Amazon","official","bank","security",          
    "urgent","Alert","important","inform  ation", "ebay", "password", "credit", "verify",
    "confirm", "account","bill", "immediately", "address", "telephone","SSN", "charity",
    "check", "secure", "personal", "confidential",
    "ATM", "warning","fraud","Citibank","IRS", "paypal"};

    int point[SIZE] =      {2,2,1,1,1,1,2,2,3,3,3,1,1,1,1,1,2,2,3,2,1,1,1,1,2,2,2,2,2,1};                                                                               
    int totalPoints[SIZE];

    void outputResults();

    int main(void)
    {
    FILE *cPtr;
    char filename[100];
    char message[5000];
    char *temp[100];
    int i;
    int counter=0;
    int words=0;
    char *tokenPtr;
    
    cout << "Enter the name of the file to be read: \n";
    cin >> filename;
    
    if ( (cPtr = fopen(filename,"rb")) == NULL)
    {
        cout <<"File cannot be opened.\n";
    }
    else
    {
        fgets(message, 5000, cPtr);
        tokenPtr = strtok(message, " ");
        temp[0] = tokenPtr;
        while (tokenPtr!=NULL)
        {
            for(i=0; i< SIZE; i++)
            {
                if(strncmp(temp[0], Phish[i], strlen(Phish[i]))==0)
                {
                    totalPoints[i]++;
                    break;
                }
                
                tokenPtr =strtok(NULL, " ");
                temp[0] = tokenPtr;
                words++;
                
            }
            outputResults();
            
            cout << "\n";
            return 0;
            
            
        }
    }
      }
         void outputResults()
       {
        int i;
        int count =0;
        int a;
        cout<<left<<setw(5) << "WORD "<< setw(7)<<"# OF OCCURRENCE "<< setw(15)<<"POINT TOTAL";
    
    for(i=0; i<SIZE; i++)
    {
        if(totalPoints[i] !=0)
        {
            cout<<"\n"<<left << setw(10)<< Phish[i] << setw(11)<< totalPoints[i]<< setw(13)<< point[i]*totalPoints[i];
            count += point[i] * totalPoints[i];
        }
    }
    cout<< "\nPoint total for entire file: \n"<< count;
    }