here is the entire source code
I am not sure by what ou mean [code] tags I looked at the FAQ but not to much guidance there. So here it is. It is used to read in the columns of data in an excel file.
#include <stdio.h>
#include <iomanip>
#include <iostream>
#include <fstream>
using namespace std;
const int maxtime = 1200;
const int maxrun = 4;
int main()
{
ifstream baseline;
ifstream input;
ofstream output;
char infile[20];
char dat[] = ".xls";
char buffer[100];
float time;
float selected;
float first;
float data[maxtime][maxrun] = {0,0};
int i;
int j;
int tmp;
int hun;
int ten;
int one;
baseline.open("sel000.xls",ios::in); //open baseline file
output.open("output.dat",ios::out); //open output file
i = 0;
while(baseline >> time >> selected)
{
data[i][0] = time;
data[i][1] = selected;
i++;
}
for(int k = 1; k <=2;k++)
{
hun = k/100;
ten = (k%100)/10;
one = k%10;
tmp = sprintf(buffer,"sel%d%d%d",hun,ten,one);
strcpy(infile, buffer);
strcat(infile,dat);
input.open(infile,ios::in); //open input file
i = 0;
while(input >> time >> first)
{
data[i][k] = first;
i++;
}
input.close();
}
for (i = 0; i < maxtime; i++)
{
for (j = 0; j < maxrun; j++)
{
output << setprecision(9) << setiosflags(ios::fixed | ios::showpoint) ;
output << data[i][j] << '\t' ;
}
output << endl;
}
return 0;
}