for a homework project I'm required to locate a string from an array. Now I've been trying to make the function work for the past hour and I'm just getting myself more confused. I'm pretty sure find() returns the address of where it found your value. What am i doing wrong here!?

Code below:

**Class Member Method:**

```
bool ArrayStorage::stdExists(string word)
{
    if (arrayOfWords != NULL)
    {
        size_t findResult = find(&arrayOfWords[0], &arrayOfWords[arrayLength], word);
        std::cout << "word found at: " << findResult << '\n';
        return true;
    }
return false;
}

```

**(string word) from main:**

```
string find = "pixel";

```

**Member method that declares array:**

```
void ArrayStorage::read(ifstream &fin1)
{
    int index = 0;
    int arrayLength = 0;
    string firstWord;

    if(fin1.is_open())
        {
            fin1 >> firstWord;
            fin1 >> arrayLength;
            setArrayLength(arrayLength);

            arrayOfWords = new string[arrayLength];

            while(!fin1.eof())
            {
                fin1 >> arrayOfWords[index];
                index++;
            }
        }
}

```

**Header File:**

```
class ArrayStorage
{

private:

    string* arrayOfWords;
    int arrayLength;
    int value;

public:

    void read(ifstream &fin1); //reads data from a file
    void write(ofstream &out1); //output data to an output stream(ostream)
    bool exists(string word); //return true or false depending whether or not a given word exists
    bool stdExists(string word); //^^ use either std::count() or std::find() inside here

    //setters
    void setArrayLength(int value);

    //getters
    int getArrayLength();

    ArrayStorage::ArrayStorage() : arrayOfWords(NULL)
    {
    }

    ArrayStorage::~ArrayStorage()
    {
        if (arrayOfWords)
        delete []arrayOfWords;
    }

};

```