C++: IFSTREAM causes problem

G

Gaby Glockner

Hello folks,

I'm desperate! I've written a subroutine on my Windows
XP laptop and it works separately. But once I've included
this subroutine into a bigger program it executes but then
I get some message popping up that a problem occurs although
it compiles fine.

There is a ifstream line in my main program which is absolutely
independent of the subroutine. Once I've removed this line
for the ifstream the subroutine works. But I need the ifstream
to read in a file.

Do you have another suggestions?!

Many thanks,
Gaby
 
V

Victor Bazarov

Gaby said:
I'm desperate! I've written a subroutine on my Windows
XP laptop and it works separately. But once I've included
this subroutine into a bigger program it executes but then
I get some message popping up that a problem occurs although
it compiles fine.

There is a ifstream line in my main program which is absolutely
independent of the subroutine. Once I've removed this line
for the ifstream the subroutine works. But I need the ifstream
to read in a file.

Do you have another suggestions?!

Another suggestions would be to read the FAQ, section 5, the
question (and the answer) 5.8. Then follow its recommendations.

V
 
J

Jacek Dziedzic

Gaby said:
Hello folks,

I'm desperate! I've written a subroutine on my Windows
XP laptop and it works separately. But once I've included
this subroutine into a bigger program it executes but then
I get some message popping up that a problem occurs although
it compiles fine.

There is a ifstream line in my main program which is absolutely
independent of the subroutine. Once I've removed this line
for the ifstream the subroutine works. But I need the ifstream
to read in a file.

Do you have another suggestions?!

Yes. Post the code.

- J.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top