473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

I cann't use ifstream to read file

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àê–è@؛
wF¹LVچ*ï§ک²ٍهئ‹غ·z)²7œf&€¬|{*]O‘•RاMwvS,lج´رë€ت^M»بف_¢!d‏5و½CگّغS¨”dACc+Q oô
…إ·ؤâگض’‘إ2ك6@®eث2¼³َِ¢?]رْ ³!§‰ Vමé·¢‏7¢اV\»K18ض•5T¦k.و_ك~¯%ˆü}7ظ؟”b’~Q3Oهذ. ™'!ذ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_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
0 1132

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

Similar topics

2
by: Mathieu Malaterre | last post by:
Hi, I am tryig to convert part of a c++ IO library. Right now I am removing all 'FILE*' and replace them with ifstream. But I have a problem, after seeking through a stream I have to call the...
12
by: Steven T. Hatton | last post by:
I know of a least one person who believes std::ifstream::read() and std::ofstream::write() are "mistakes". They seem to do the job I want done. What's wrong with them. This is the code I...
40
by: Abby | last post by:
My .dat file will contain information like below. /////////// First 0x04 0x05 0x06 Second 0x07
2
by: somequestion | last post by:
During copying file , wanna read file Size like this string CheckFileSize(string fileName) { if( fileName == null ) return; FileInfo fi = new FileInfo(fileName); return fi.Length.ToString();...
4
by: supemoy | last post by:
I am having a heck of a time using the ifstream::read() method. I am using Visual Studio 6.0, and my intelisense indicates that read has an overload of: ifstream::read(unsigned char*, int _n) A...
9
by: vermarajeev | last post by:
Hi, Is there a way to convert ifstream to FILE*; Something like this ifstream ifs( " test.txt "); if( !ifs.is_opsn() ) return 0; FILE* f = ifs; //how can I convert ifs to FILE*
3
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, Is there anything wrong with the code below in sending my browser page to Excel? Before my page opens in Excel there's a message "Problems came up in the following areas during load:" and it...
2
by: xplode144 | last post by:
I have a Web application. i need to read a file once during the startup and preserve the read data throughout the life of the application. i will to access the data often during the page_load of...
0
by: leeamiin | last post by:
Hi, i need help with bellow file format, i work for telecom company and i'm the developer, what i need help with is to read file with bellow format, as you can see the file has { and , as...
1
by: roverzon | last post by:
I have a code for reading a series of data from a text file. The code was shown below I don't know why I can't successfully read file. (Can open successfully) btw: the text file and source code...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.