954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

arghh.......help me pls~~~~urgent

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 ........

ricnyx
Newbie Poster
21 posts since Nov 2007
Reputation Points: 8
Solved Threads: 0
 

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

ricnyx
Newbie Poster
21 posts since Nov 2007
Reputation Points: 8
Solved Threads: 0
 

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

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

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

#include
#include
#include

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?

ricnyx
Newbie Poster
21 posts since Nov 2007
Reputation Points: 8
Solved Threads: 0
 

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

ricnyx
Newbie Poster
21 posts since Nov 2007
Reputation Points: 8
Solved Threads: 0
 

i will give u a hint u might find atoi function useful...

here is the link...
http://www.space.unibe.ch/comp_doc/c_manual/C/EXAMPLES/exponent.c#atoi

i am sorry if i got the question u r asking wrong...

bilalb1
Newbie Poster
18 posts since Aug 2007
Reputation Points: 10
Solved Threads: 1
 

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

bilalb1
Newbie Poster
18 posts since Aug 2007
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You