I cann't use ifstream to read file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eslam
    New Member
    • Dec 2013
    • 1

    I cann't use ifstream to read file

    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àê –è@؛
    wF¹LVچ*ï§ک²ٍ هئ‹غ·z)²7œf&€¬ |{*]O‘•RاMwvS,lج´رë €ت^M»بف_¢!d‏5 و½CگّغS¨”dA Cc+Qoô
    …إ·ؤâگض’‘إ2ك 6@®eث2¼³َِ¢?]رْ ³!§‰ Vමé·¢‏7¢اV\» K18ض•5T¦k.و_ك ~¯%ˆü}7ظ؟”b’~Q 3Oهذ.™'!ذ7*ن‘ْ ژ*,دحىZcFŒà{ْ\^ ¾عبzèںىھKَ9فP êفƒ®ظüکKپµŒ*ا ج¹ٌ:iده±=´ yٌl.
    2Aا#RطNc4 *ھ؟îِxDft£vâغ ´©ے%5ح‹Oذâv€ ا¯ْ4تùٌ ˆ–
    ¼"


    my code to read it is:

    ifstream infilo;
    infilo.open("C: \\Dev-Cpp\\rc4\\in_ci pher.txt");
    std::string ciphero((std::i streambuf_itera tor<char> (infilo)),std:: istreambuf_iter ator<char>());
    infilo.close();


    i want to read all the data in the encrypted file any help plz
Working...