errorlocation() routine, implemented in C++ based on pseudocode
Writing psuedo-code first, then turning it into code is great. However, we should then delete the pseudo-code.

The problem with comments like this is that they mainly just repeat the code. If we need a comment to explain what the code does, we should make the code clearer instead. Comments that explain why the code does something the way it does are more helpful.

Note also that if we change the code in the future, we would have to update all these comments too, which is twice the work.

Comments for documentation purposes tend to be structured according to the documentation tool in use (e.g. short description, purpose of arguments, return values, etc.). However, they are probably unnecessary for a small function that will be used internally in a project.



Some issues with the code:


Do we ever really expect locationStart to be after locationCurrent? Perhaps an assertion, or an exception would be more appropriate.
Otherwise std::optional would be a better choice for the return value.
We should use appropriate types for indexing. If the range of indices for Iter cannot be negative, and needs to cover the range of a standard container (e.g. std::string), we should use std::size_t, not int.
It's probably clearer to use the divide and remainder operators directly, instead of std::div (if that's what div is). Note that std::div, std::ldiv, and std::lldiv all use signed integer types, which probably don't cover the appropriate range.
The local error variable is unnecessary.
What is 80? Perhaps this should be a function argument (or at least a named constant).
We can be more consistent with naming. (The function is getErrorPosition, but we're returning a Point. Perhaps CharacterPosition would be a better name than Point).
Although it's called getErrorPosition, this function is not specific to errors - it just gets the character position from the iterators. If we give it a more general name, then we can use it for other things too.




So I'd suggest something like this (though the doc comments are probably not needed):

#include &lt;cassert&gt;
#include &lt;cstdlib&gt;
#include &lt;iterator&gt;

struct CharacterPosition
{
    std::size_t row;
    std::size_t column;
};

/// \brief Returns the character position (row / column) from its index.
/// \param index The distance of the character from start of the document.
/// \param lineLength The line length of the document (all lines must be this length for the returned character position to be correct).
/// \return Row and column of the character.
CharacterPosition getCharacterPosition(std::size_t index, std::size_t lineLength)
{
    return { index / lineLength, index % lineLength };
}

/// \brief Returns the character position (row / column) from its iterator position.
/// \param start An iterator pointing to the first character of the document.
/// \param current An iterator pointing to the current character (for which we will return the position).
/// \param lineLength The line length of the document (all lines must be this length for the returned character position to be correct).
/// \return Row and column of the character.
/// \pre The current iterator must not be positioned before the start iterator
template&lt;typename Iter&gt;
CharacterPosition getCharacterPosition(Iter start, Iter current, std::size_t lineLength)
{
    assert(start &lt;= current);

    auto distance = std::distance(start, current);

    return getCharacterPosition(distance, lineLength);
}