Self-made string class
Possible undefined behaviour

There are several places that will lead to undefined behaviour.

In ajustar it can be possible that longitud &lt; taminio. We will then happily copy into cadenaTemporal[i] where longitud &lt; i &lt; taminio. It's easy to create an example for this:

David::Cadena example("oh oh");
std::cin &gt;&gt; example;


So instead of taminio use both longitud as well as taminio as upper limit.

In operator [] (size_t indice), you return bufer[-1] on example[0] if the string hasn't been initialized. This should either get documented or checked.

Consistency

borrarBufer() should also set tamino to zero. That seems to be your "empty string" scenario.

Don't include the \0 in len()

If the string is empty, len() should return 0, not -1. strlen() or std::string::size() don't return the \0 either.

    const size_t len() const {
        return tamanio;
    }


Use common interface

operator= should return a Cadena&amp;, not void. Similar, operator&gt;&gt; should return istream&amp;, not void.

Follow the rule of five

You provide a custom constructor. Therefore, you should also provide


a custom copy constructor,
a custom move constructor,
a custom copy assignment,
a custom move assignment and
a custom destructor.


You don't provide any of them, but you should. For example, I cannot copy a Cadena at the moment. I have to write

Cadena my_copy(other.formaConstante())


Use copy and swap idiom for operator=

As soon as you have a copy constructor, you can write operator= very easy:

    void swap(Cadena &amp; other) {
        std::swap(tamino, other.tamino);
        std::swap(bufer,  other.bufer);
    }

    Cadena&amp; operator=(const char* cadena) {
        Cadena temporary(cadena);
        swap(cadena);
        return *this;
    }


Provide push(char) to add single characters

This will make operator&gt;&gt; a lot simpler.

Use a capacity

Your operator&gt;&gt; is \$\mathcal O(n^2)\$ since you have to realloc for every single char. Instead, allocate more memory than you actually need. Or use std::vector for your internal memory instead, it will take care of that automatically.