Im trying to implement the Boyer Moore(bad character heuristic) algorithm, except i want to use a dynamic array. Can anyone help me with this problem? here's my source code.
**/* Program for Bad Character Heuristic of Boyer Moore String Matching Algorithm */
# include <limits.h>
# include <string.h>
# include <stdio.h>
# define NO_OF_CHARS 256
/* Driver program to test above funtion */
int main()
{
    char txt[];
    char pat[];
    ifstream myfile;
    string filename;
    cout<<"input file"<<endl;
    getline(cin, filename);
    myfile.open(filename.c_str());
        if(myfile.is_open()){
            cout<<"file not found"<<endl;
            while(getline(myfile, txt))
            {
                cout<<txt<<endl;
            }
           cout<<"pls input pattern"<<endl;
           cin.getline(pat[]);
           search(txt, pat);
           myfile.close();
        }
        else cout<<"file not found"<<endl:
    return 0;
}**
 
    