makefile and main cpp file
some error checking
Merge pull request #1 from rapjac/isha

merging branch isha