I am attempting to use Gtk TextIter objects to lift three-character slices out of a TextBuffer, but am having trouble with the arithmetic. I set up an iterator p to point to the start of the range and want q to point to three characters further on.
I have tried...
q = p + 3; // Doesn't compile
q = p; q += 3; // Doesn't compile
q = p; q++; q++; q++; // Happy
I'd like to know what the correct way to do this is. The third method works, but looks like a ghastly hack.
Any thoughts?