By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,659 Members | 1,611 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,659 IT Pros & Developers. It's quick & easy.

I cann't use ifstream to read file

P: 1
i have an encryption program that take input from a text file and encrypt it and put the output in atext file then to decrypt it again i take the encrypted file as input for decryption program but i cannot read all the content of this file i can only read apart of it although that iam using what i did in the encryption program to read the input file.
the encrypted file is "u،~چںaJjطوڑظپهزz^h6؛تٌSaطyٍْbزy@؛
wFLVچ*کٍهئغz)7f&|{*]ORاMwvS,lجرت^Mبف_!d‏5وCگّغSdACc+Q o
إؤگضإ2ك6@eث2َِ?]رْ ! Vම鷢‏7اV\K18ض5Tk.و_ك~%}7ظ؟b~Q3Oهذ. '!ذ7*نْژ*,دحىZcF{ْ\^عبzںىھKَ9فPفظکKپ *اجٌ:iده=yٌl.
2Aا#RطNc4 *ھ؟ِxDftvغے%5حOذvاْ4تٌ
"


my code to read it is:

ifstream infilo;
infilo.open("C:\\Dev-Cpp\\rc4\\in_cipher.txt");
std::string ciphero((std::istreambuf_iterator<char> (infilo)),std::istreambuf_iterator<char>());
infilo.close();


i want to read all the data in the encrypted file any help plz
Dec 8 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.