It's impossible to compile this code: char binary[ElementAmount]; declaraion where ElementAmount is not initialized variable is wrong.
Post another "0 warning 0 errors" snippet ;)...
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
You should initialize ElementAmount to zero. Note that if you compile with the -pedantic option, you'll get an error about variable-size array usage, i.e. you might want to change ...
char binary[ElementAmount];
to
char * binary = new char[ElementAmount];
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
and don't forget to delete the memory once you're done with it!
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403