Hello! Im new to this site. Programming has become one of my side hobbies, even though I'm not very good at it Anyway, I have created a program that converts a text file that contains a HEX dump into a binary file. The text file looks like so...:
... and so on
D = predetermined hex data
Heres the beginning of my code...
long int hexdata;
long int x;
... it also opens a text file called dump.txt, and uses fwrite to write each line into a binary file. The problem I am having is that if I increase the size of the array to say 7 digits (99999999) to accomidate for larger text files, the program crashes upon start. It doesnt even attempt to execute. Accordind to this C programming book, a long integer can be at max 10 digits (2,147,483,647) So why cant I declare my array to a similar size? Thanks for any help.