Q:

Binary Tree Construction using preorder- C++

Reading user input of a preorder binary tree where '.' denotes an empty child. For example "ABC..DE...F.G.." How would I construct a binary tree using linked lists in C++ from preorder input from a user?

A:

Supposing your question is about generating a binary tree out of a linked list previously ordered. The content of each leaf is either a letter [A-Z] or a '.' indicating empty leaf.
#include <iostream>
#include <memory>
#include <string>
using namespace std;
class BTree
{
    typedef unique_ptr<BTree> BTreePtr;
    char content='.';
    BTreePtr left=nullptr;
    BTreePtr right=nullptr;
public:
    BTree( const string& s)
    {
        if (s.size()==0) return;//robustness check, 

        size_t sizeLeft = s.size()/2;
        content = s[sizeLeft]; // We are sure size>0
        if (sizeLeft>0) left=BTreePtr(new(nothrow) BTree( s.substr(0,sizeLeft)));
        if (s.size()>sizeLeft+1) right=BTreePtr(new(nothrow)BTree(s.substr(sizeLeft+1)));
    }

    string serialize()
    {
        return (left?left->serialize():string()) + 
               content + (right?right->serialize():string());
    }
};

You could check how it works, like:
int main()
{
    BTree b("ABC..DE...F.G..");
    cout << b.serialize() << endl;
    return 0;
}

