I have a function that takes an array, calculates the ln of that array into another array called lnt. I would like to pass lnt back to the main. I know it has something to do with int *foo or something but I cannot seem to get a code to work.
// This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "stdafx.h"
#include <math.h>
#using <mscorlib.dll>
using namespace System::IO;
using namespace System;
const int n=10;
//function declaration
int** FindLN(double t[n]);
int _tmain()
{
String* path = "DailyReport(2).csv";
String* MRVF= "Merrill - Valley Farms";
//create array of times of outages
//n = number of outages
double t[n]={15.70, 29.39, 41.14, 56.47, 75.61, 98.83 ,112.42, 125.61, 129.39, 133.45};
FindLN( t);
int ** lnt = foo(5);
return 0;
}
int** FindLN(double t[n])
{
int index;
double lnt[n];
for (index=0; index<n; index++)
{
lnt[index]=log(t[index]);
//Console::WriteLine(lnt[index]);
return lnt;
}
}