I'm using this language to edit an open-source software, which has a graphical interface that uses an engine (a DLL made in C). This software is for hydraulic systems project. On my final thesis, I have to change the original water demand calculations of this model.
So, I am trying to create a routine to write the variables on a text file and then, pass by pass, know if what I am calculating is correct or not.
When I use the codes I created in a different project (a console application), everything runs fine: the text file is created, and the variables are written on the file. But, using the same code on the DLL, nothing happens.
The code is:
Code:
void demands()
{
FILE *f;
int i;
f = fopen("demands.txt", "w");
for (i=1; i<=Njuncs; i++)
{
fprintf(f, "%d %d/n", i, D[i]);
}
fclose(f);
}
Where D[i] is the demands array, calculated in other function. I've tried to run the code inside that function, but nothing happened either.
Thanks,
Gabriel