473,408 Members | 2,832 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,408 software developers and data experts.

problem on ifstream

My code always appear an error at:
ifstream myfile("......file path"); my file path is correct. Any
suggestions on how to wipe this error.

--------------------------------------------------------------------------------------
http://winend.com/greetings/happy-valentines-day.html

Feb 12 '07 #1
6 1647
What's wrong with your code, can you give the error message?

And what do you want to do?
Read from file or write to file?
"ImageMagicLeader" <da********@gmail.comдÈëÏûÏ¢ÐÂÎÅ:11************** *******@a34g2000cwb.googlegroups.com...
My code always appear an error at:
ifstream myfile("......file path"); my file path is correct. Any
suggestions on how to wipe this error.

--------------------------------------------------------------------------------------
http://winend.com/greetings/happy-valentines-day.html

Feb 12 '07 #2

Post some code that demonstrates your problem, i.e. a complete piece of
code I can cut-n-paste into a file and run my compiler over.

ImageMagicLeader wrote:
My code always appear an error at:
ifstream myfile("......file path"); my file path is correct. Any
suggestions on how to wipe this error.

--------------------------------------------------------------------------------------
http://winend.com/greetings/happy-valentines-day.html
Feb 12 '07 #3
ImageMagicLeader wrote:
My code always appear an error at:
ifstream myfile("......file path"); my file path is correct. Any
suggestions on how to wipe this error.
*What* error?

- J.
Feb 12 '07 #4
ImageMagicLeader wrote:
My code always appear an error at:
ifstream myfile("......file path"); my file path is correct. Any
suggestions on how to wipe this error.

--------------------------------------------------------------------------------------
http://winend.com/greetings/happy-valentines-day.html
You have an error on line 42 of your code.

Please see
http://www.parashift.com/c++-faq-lit...t.html#faq-5.8 for more
details.
Feb 12 '07 #5
Gianni Mariani wrote:
>
Post some code that demonstrates your problem, i.e. a complete piece
of code I can cut-n-paste into a file and run my compiler over.
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
Feb 12 '07 #6
On Feb 12, 6:56 pm, "ImageMagicLeader" <dai.zhi...@gmail.comwrote:
My code always appear an error at:
ifstream myfile("......file path"); my file path is correct. Any
suggestions on how to wipe this error.

--------------------------------------------------------------------------------------http://winend.com/greetings/happy-valentines-day.html

Thanks for everyone's reply, my problem resoveled, it's due to the
memory leak before this line code.

But I also curious about why the code run to this point get an error.

Regards

Feb 22 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: pentiumPunk | last post by:
string fileName; cout<<"Enter filename of datafile you wish to open \n"; cin>>fileName; ifstream fin; fin.open(fileName, ifstream::ios); if(!fin) {
3
by: nadz | last post by:
just looking at this main int main() { ifstream fin("text.txt"); doStuff(fin); //processes the data from text.txt fin.close(); fin.open("text2.txt"); doStuff(fin); //processes the data from...
7
by: Anton Ishmurzin | last post by:
Greetings All, I think everybodyknows the answer already. But i am quite a newbie in c++. I've got the following line in my code: ifstream ini_file_in("filename.dat", ios::in); But, the...
6
by: Ram Laxman | last post by:
Iam new bie to C++ programming.. I want to write a program which will read the Comma separated values(CSV) file column wise. For example: In a.txt: "TicketNumber","Phone","CarNumber"...
3
by: Mike Alexeev | last post by:
Hi all, I have come across very strange behavior of the return value of the time() function. Below is the program to illustrate the problem: The value of NOW somehow changes after the call to the...
4
by: jared.oconnell | last post by:
Howdy, I am having a weird problem with ifstream. ifstream img; img.open(im_fn.c_str(),ios::in|ios::binary); char *x = new char; if(!img) { cerr << "Error: problem reading img" << endl;...
2
by: merrittr | last post by:
I have a small program to read data from some data files , in it I use string types to build the data file name but when I try to compile it I get: (see code below error) ...
1
by: SantaClaus | last post by:
Hi all, Im getting an exception in the middle of reading a file and here is my code std::ifstream inf; const int bufSize=1024; char tbuffer; std::string filex = path; // may be C:\test.txt const...
3
by: waynejr25 | last post by:
can anyone debug my program and get it to run. #include <fstream> #include <iostream> #include <string> #include <cstdlib> #include <map> using namespace std;
9
by: aemado | last post by:
I haven't written basic array code in so long, I have forgotten how to do some of it. I have two data files. There is some data that is common to both, and some that is only in the first and not the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.