I wrote a short piece of code to give me a .dat file for use in another program. But i cant figure out what is wrong. I run on a mac, and use Xcode.
#include <stdio.h>
#define ARRAYSIZE 1500
#define BINDATA "file://localhost/Users/Hub/Desktop/231A4binData.dat"
int main (void)
{
int i;
double dblData[ARRAYSIZE];
FILE * dblPoint;
int dblSize = sizeof(double);
for (i = 0; i < ARRAYSIZE; i++)
{
dblData[i] = i * 2;
}
dblPoint = fopen(BINDATA, "wb");
fwrite(dblData, dblSize, ARRAYSIZE, dblPoint);
fclose(dblPoint);
return 0;
}
any help or words of advice are greatly appreciated.