im the newbie among the newbie .....need a nice and patient guy who willing to guide me of my assignment.....cause the deadline is tis weekend......i dun know or can say hard to post the problem out...cause too many.............need urgent reply.........can msn ??? pls pls pls pls...........i got plenty of question to ask......really need a patient guy ........

can guide me through msn????? pls .....

No. Read our rules about keeping help on the site.

haiz....all sleep?
hope tat hav ppl can ans my question now.....

#include <fstream>
#include <iostream>
#include <cstdlib>


int main( )
{
using namespace std;
ifstream in_stream;
ofstream out_stream;


in_stream.open("infile.dat");
if (in_stream.fail( ))
{
cout << "Input file opening failed.\n";
exit(1);
}


out_stream.open("outfile.dat");
if (out_stream.fail( ))
{
cout << "Output file opening failed.\n";
exit(1);
}


int first, second, third;
in_stream >> first >> second >> third;
out_stream << "The sum of the first 3\n"
<< "numbers in infile.dat\n"
<< "is " << (first + second + third)
<< endl;


in_stream.close( );
out_stream.close( );


return 0;
}

wat if i wan to read all integer number ???wat should i do?

time is mana ~~~~ ^^V
guide me guide me pls............

i am afraid thats all i can do...try reading line by line convert to each string to int and add them ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.