J
james
Hi,
I'm new to C++, and coming from a dynamically-typed language, I'm
finding the data types difficult. My goal at the moment is to append
a string that is typed as a command line argument into the end of a
file, and I'm wondering if somebody could point me in the right
direction. At the moment, I can open the file and write a hard-coded
string using:
#include <fstream.h>
#include <iostream.h>
#include <cstdlib>
int main()
{
fstream fout("./output.txt",ios:ut);
fout<<"String";
fout.close();
}
I am using the g++ compiler under Debian to compile.
All help is appreciated,
--James.
I'm new to C++, and coming from a dynamically-typed language, I'm
finding the data types difficult. My goal at the moment is to append
a string that is typed as a command line argument into the end of a
file, and I'm wondering if somebody could point me in the right
direction. At the moment, I can open the file and write a hard-coded
string using:
#include <fstream.h>
#include <iostream.h>
#include <cstdlib>
int main()
{
fstream fout("./output.txt",ios:ut);
fout<<"String";
fout.close();
}
I am using the g++ compiler under Debian to compile.
All help is appreciated,
--James.