The answer is, no, because you are not actually encrypting your message. You are replacing it with asterisks. That's a one-way function.
Hmm, I just noticed that bartoli already said that.
@vizard
What is it you are trying to do, exactly? Is this a homework for CS101 or something? Advanced encryption methods are around CS300 and above. If this is coursework, you can get along with something as simple as a Caesar cipher, where you just add three to each letter in the code, wrapping around.
A lookup table helps.
INPUT A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
OUTPUT D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Given the input letter 'K', we find 'K' in the INPUT table, and then find its match in the OUTPUT table, which is 'N'. (Remember, 'K' + 3 = 'N'.)
So, your encryption could take a message like:
HELLO WORLD
and turn it into
KHOOR ZRUOG
To turn it back, you just use the lookup tables the other way, that is, subtract three.
There are other things to consider, of course. Do you stick to just uppercase letters? Or do you use every value possibly input?
BTW, there is no reason you should be using MAX_PATH (or #including <windows.h> to access the macro). Just specify a large number like 1000. Though...
you really should be using std::string (#include <string>). If you haven't been taught that yet, the char* is fine.