File won't save output to file, and prints out a string oddly C++ Linux

Posted by Predictability on Stack Overflow See other posts from Stack Overflow or by Predictability
Published on 2012-12-04T04:57:04Z Indexed on 2012/12/04 5:03 UTC
Read the original article Hit count: 141

Filed under:
|
|

I'm trying to make a password code, the user enters a password, then it will save the password to a file in /tmp/ and then it will output the password (For me so I can find bugs). I have included the "string" library, and I set the password type to string, but when I output it, it outputs like this:

0x7fffb55baac0password // <-- thats the password I entered

It will output hex (I think), then the password I entered, and it won't save it to the file in /tmp/ I want it to (Or any file in /tmp/). Here's the source code: http://codepad.org/3aamAv7R Thank you for all the help you guys have given me so far.

© Stack Overflow or respective owner

Related posts about c++

Related posts about file-io