I need to write a script for a program I am running and I have never written on. I don't even know what commands scripts use, or what they even look like. Does anyone know any tutorials or example I could modify to fit my needs? Thanks,
I have a random number generator which outputs a file that my program uses. I want to be able to write something so that I don't have to manually execute the random number generator and then manually move the file to where the program need it. Pretty much have the random number generator and the program to run without having me execute them each time. I am only familliar with c++, I do not know any pearl. I hope this is more clear.
The program I am running is a Fortran program. What is does is run a simulation. I have a code that outputs a file for the fortran program, and when it has that program I run the simulation. The simulation roughly an hour to run, what I am trying to do is have the program continue to run for about 2 months without me having to execute the program each time. I pretty much want something where I can start it one day, and check on it a week later or something to that extent.
I know essentially no nothing about writing scripts, I was led to believe I could write a script in c++ (the only language I know). All I need to do is execute the fortran program, nothing more than that. From everyone's responses I take it you can't write a script in c++, I'm just trying to figure out what I need to do because I am in the dark. Thanks, sorry for frustrating anyone out there.
I agree as well, however I chose goto so I did not have to fix the spacing (I cannot use tab on this text box). Lame excuse and write-up I know. :eek:
Anyways, to make up for it:
using namespace System;
using namespace System::IO;
using namespace std;
string* NewPath = S"C:\\File.txt"; // Your path
string* OldPath = String::Concat(NewPath, S"temp");
cFile.open("File.txt"); // or should it be NewPath? Not quite sure...
int num = rand();
while(1) // For you prog-bman : )
cFile << num << endl;
Hopefully I did not mess up anywhere in this. I used notepad this time : )