|
General Details
|
|
C++
|
|
Posted 3.44 Years Ago
|
|
592 Views
|
|
Received 0 Ratings
|
|
Hex Dumper
Description
My very first program - written as a programming exercise plus MS-DOS doesn't seem to have a program that does this - have missed the ability to dump files in hex.
Takes the name of the file direct from the command line.
Technical
Written and compiled using MSVC 2008 Express Edition (Windows)
Source Code
Comments
| Please login to post comments. |
|
|
You should use the isprint() function to detect whether a charachter is printable or not.
http://www.mkssoftware.com/docs/man3/isprint.3.asp
Also why did you make those variables global?
----
printf("HexDumper v1.00 by Yesideez (13-Dec-2008)\n\n");
printf("USAGE: %s <filename>\n",argv[0]);
----
Code like this is bad, it requires two function calls when the code could be done quite simply using one.
----
printf(
"HexDumper v1.00 by Yesideez (13-Dec-2008)\n\n"
"USAGE: %s <filename>\n",argv[0]
);
----
You won't save much file space or execution time, but you will save some, and I argue why not?
|
More "C++" Source Codes By This Author
Recently Posted "C++" Source Codes
Recently Rated "C++" Source Codes
|