0

I have been trying to follow what you guys where doing here because I have to do something simalar. Can you tell me what the name of your file is jaffo, is it a .dat or a .txt file?
You where using ary, is that the file name?
Acient Dragon,
this is the code that you posted.

int iarray[3] = {0};
float farray[3] = {0.0F};

ifstream in("MCSequentialFile");
in >> iarray[0] >> iarray[1] >> iarray[2];
in >> farray[0] >> farray[1] >> farray[2];

If I was to use your example what would I name my file or doesn't it make any difference?
I created a .dat file using these names:
ofstream outMCSequentialFile( "calculations.dat", ios::out );
So how do I have to call out this file in main?

the .dat file:
7 15 30
5.35 5.5 5.75

Thanks,
Ken

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Ancient Dragon
0

>> what would I name my file or doesn't it make any difference?
It doesn't matter -- name it whatever you want. Text files normally have *.txt extension, not *.dat.

>>So how do I have to call out this file in main?
With ofstream its not necessary to specify ios::out because that's the default. Same with ifstream. ifstream outMCSequentialFile( "calculations.dat");

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.