I'm using recursion to output array to text file. Thanks for the help.
Here is code. I'm only getting the last number in the text file. What do I need to fix?
KT
File_Array_Recurs(int Array[], int size)
{
ofstream outi("data4.txt"
if(size>=0)
File_Array_Recurs(Array, size -1);
outi<<Array[size]<<endl;
outi.close();
}
and this is what I had in header file
File_Array_Recurs(int[], int);
Driver File
File_Array_Recurs(Array, size -1);
[sig][/sig]
Here is code. I'm only getting the last number in the text file. What do I need to fix?
KT
File_Array_Recurs(int Array[], int size)
{
ofstream outi("data4.txt"
if(size>=0)
File_Array_Recurs(Array, size -1);
outi<<Array[size]<<endl;
outi.close();
}
and this is what I had in header file
File_Array_Recurs(int[], int);
Driver File
File_Array_Recurs(Array, size -1);
[sig][/sig]