Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (cwtan):

Can I ask about C++ Programming language here?

OpenStudy (anonymous):

Yes.

OpenStudy (lgbasallote):

sure. why not

OpenStudy (anonymous):

yes pal!

OpenStudy (anonymous):

So, what's your question ?

OpenStudy (cwtan):

Can anyone teach me how to create a file er........... I done a program with the output and i want it to record in a .dat file and I need to do another program that can read that .dat file......(of course need printf the record)

OpenStudy (anonymous):

Well @cwtan, it depends on what libraries you choose to include... #include <iostream> #include <fstream> using namespace std; int main () { ofstream newFile; newFile.open ("example.txt"); newFile << "This is a string being written to a file. Yay! \n"; newFile.close(); return 0; }

OpenStudy (cwtan):

what if I just #include<stdio.h>? wasc.....

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!