Line and column tracker for text files
Overall I'd say this code is very easy to read. I can see quickly how everything works. Here are a few suggestions:
Only Make Public What's Necessary
There are 3 update() functions. Looking at them, it's not clear what the purpose of them is. The first one doesn't look like it should be public at all. It changes the internal state of the object, but doesn't update the string it comes from, which is confusing. It means that a caller could repeatedly call it with the same character from a string and it would count incorrectly. I'd make that version private.
I'd also make the argument to void update(char) be const since it's not modified.
Naming
Name Your Method Arguments!
What do the method arguments represent? Presumably for the 2 update() methods that take a pointer to a character, they represent a string to be parsed. They should have a name like parseString or something similar.
Improve Your Method Names
The method name update() doesn't tell me anything about what the function does. Any method that modifies the state of an object updates it in some way. A better name might be parse() or advanceLineAndColumn() or something that says what it actually does.
The getStr() method is very deceptive because it looks like it gets a pointer to the string this object is parsing. But it doesn't! Since this is C++, you'd be better served by making an operator&lt;&lt;() method or free function to print out your object.
Even reset() could be a little more descriptive. Perhaps something like resetParsing() or resetLineAndColumn(). Consequently, why would I want to use reset() instead of just creating a new instance? They seem fairly lightweight, so what's the advantage? If there is one, maybe that would be helpful in renaming the method.
Fix This Bug
In updated(str, size); you have a potential memory stomper. If size is greater than the actual length of str, you'll call update(str); and str might point to memory you don't have permission to read, causing a crash. Alternatively it might point to other data in your app and cause other problems such as incorrect line and column values.
All of this could be avoided if you...
Use std::string
Since you're using C++, you should be using C++'s string class to handle strings. It eliminates the possibility of running off the end of the string because you can access it using the at() method, which will throw an exception if you try to access a character outside the length of the string.