s_0
03-16-04, 02:13 PM
im trying to make a prog to make a .txt with certain txt in it and i cant seem to get it to put the systemdir in their also trying to get it to make a random number within it too i have this so far
-
#include <iostream.h>
#include <fstream.h>
#include <cstdlib>
#include <ctime>
int main()
{
ofstream fout("test.txt");
fout << "testing GetSystemDir()" << endl;
fout << "testing rand()" << endl;
fout.close();
char str[20];
ifstream fin("test.txt");
fin >> str;
fin.close();
return 0;
}
any help would be lovely thx
-
#include <iostream.h>
#include <fstream.h>
#include <cstdlib>
#include <ctime>
int main()
{
ofstream fout("test.txt");
fout << "testing GetSystemDir()" << endl;
fout << "testing rand()" << endl;
fout.close();
char str[20];
ifstream fin("test.txt");
fin >> str;
fin.close();
return 0;
}
any help would be lovely thx