Trobleshoot Write to ext file

I am trying to write to external file in GCC. So far I can get to this:

#include <iostream>;
#include <fstream.h>;
using namespace std;
int stream (int argc, char* const argv[]) {
ifstream in ("mcp.strings");


if (in)
{
in >> character;
while (!in.eof())
{
in>> number;
cout << number << " " << character << "\n";
in >> character;
}
in.close ( );
}
else
cout << "File Was Not Found" << "\n";
system("PAUSE");

I need to know if I am using the correct method to choose file name.
and how to set a script(double) variable to print input text or choose an on/off (0|1) input to be written to a text file.

I would also appreciate links to flags (i.e. pointers and how to use them).

I think that's all I need to know for now.

If anything related comes to mind I will add comment to this topic.

Cheers, OSKG.
The context of your question isn't clear. Can explain what your doing to provide some context for those questions please.
I want to write Binary to file
I want to place it and end of line
I want to choose which line it is written to
I want to write to file indicated by filename
Topic archived. No new replies allowed.