Did you type "g++ md5wrapper.cpp md5.cpp" on the command line, or just md5.cpp?
Printable View
You need all those .h files too.
Thank you so much. This seems to have done the trick and I no longer get error messages. However, when I run the program, I get nothing from the output. How can I print out what the MD5 hash for "Hello World" is? Is the hash stored in the variable hash1?
The reason I am confused is because the variable hash1 was not declared...unless it is declared elsewhere? The code that I am running is as follows:
Code:#include "md5wrapper.h"
int main( int argc, char** argv )
{
// creating a wrapper object
md5wrapper md5;
// create a hash from a string
std::string hash1 = md5.getHashFromString("Hello World");
// create a hash from a file
std::string hash2 = md5.getHashFromFile("readme.txt");
return 0;
}
Thank you for your help, I think I have it now. :)