Checking for spelling errors with a trie
Node

Raw arrays:

std::shared_ptr&lt;Node&gt; child[ALPHABETSIZE];


are really awkward. There's little reason to prefer to use one here. Use a std::array instead:

std::array&lt;std::shared_ptr&lt;Node&gt;, ALPHABETSIZE&gt; children;


Also I pluralized your array name. Seems to make more sense. You also want to make sure that a default-constructed Node is valid, so I find it clearer to just add data member initializers:

struct Node {
    bool isEnd = false;
    int prefixCount = 0;
    std::array&lt;std::shared_ptr&lt;Node&gt;, ALPHABETSIZE&gt; children;
};


Now you don't have to worry about default/value initialization.

You current construct your head via:

head = std::make_unique&lt;Node&gt;();


But head is a shared_ptr so you should do:

head = std::make_shared&lt;Node&gt;();


And with the added data member initializers, that's all we need to do in our constructor. Done!

insertion

Prefer a range-based for loop anytime you want to loop over everything in a container without needing the iterator. It expresses intent better:

for (char c : word) {
    int letter = c - 'a';
    ...
}


Also, what if word contains anything other than a lower-case letter? What if it's a capital letter or a space or a hyphen? This does no error checking here, so leaves open the possibility of undefined behavior due to invalid memory access.

Choice of data structure

Does having 26 children for each node make sense? That could be very memory intensive if our data set is sparse! I'd expect something more like:

std::unordered_map&lt;char, std::shared_ptr&lt;Node&gt;&gt;


with which this would just look like:

auto&amp; next = current-&gt;children[letter];
if (!next) next = std::make_shared&lt;Node&gt;();
next-&gt;prefixCount++;
current = next;


searching

I would rename search() to contains(), and same points apply about sanity checking your inputs and using a range-based for loop. 

wordsWithPrefix

Note that your search and wordsWithPrefix do the same thing: we walk the length of the string, break early if we run out of children, and do something with the result. That suggests adding a helper function:

std::shared_ptr&lt;Node&gt; atPrefix(const std::string&amp; prefix) const;


which does that work for us. With that function, we can implement:

bool contains(const std::string&amp; word) const
{
    auto node = atPrefix(word);
    return node &amp;&amp; node-&gt;isEnd;
}

unsigned int wordsWithPrefix(const std::string&amp; prefix) const
{
    auto node = atPrefix(prefix);
    return node ? node-&gt;prefixCount : 0;
}


Trie construction

You may want to add a constructor that will iterate over and insert a bunch of words. Maybe take two iterators, same as the other standard containers.

cin and getline

Be careful about mixing those two. It doesn't always work. 

Also, don't do this:

std::string word = " ", input;


Space isn't at a premium, you can declare your variables on separate lines.

main()

What is input? I don't understand your usage here. Are you mandating a sorted dictionary.txt for this to work? Some comments indicating this would be helpful. 

final loop

at() vs operator[] just does range-checking. You don't need that here, so simply use operator[]. Also if what you want to do is divide input, you don't need a second argument to substr() - just the one will automatically print the remainder of the string from there on out. Besides, your length argument is incorrect anyway. 

Prefer:

std::string x;
for (char c : input) {
    x += c;
    if (trie.wordsWithPrefix(x) == 0) {
        std::cout &lt;&lt; x &lt;&lt; '&lt;' &lt;&lt; input.substr(x.size());
        break;
    }
}


file.close()

Unnecessary. The ifstream destructor will take care of itself. RAII for the win.