added counter when comparing
c example
cpp example (initial)
fix c, more cpp example
cpp example gets input parameters