Renamed greedy.c->.cpp
Minor bug fix: type casts