Removed unnecessary iterator copy in input::getc()

Replaced the post-increment operator++ usage in input::getc to avoid an iterator copy.