HOW TO PLOT DATES FROM A FILE WITH GTKPLOT??
[email protected] Thu, 28 Sep 2006 17:34:34 +0200
| Newsgroups | gmane.comp.scigraphica.gtkextra |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone!!
I need to plot dates from a file using gtk_plot.
As i saw in examples, dates are gdouble format.
So this is my code to read the dates:
#define N_P 3
void main()
{
FILE *fp,*fp_sal;
char registro[200][N_P];
int i;
gdouble px[N_P],py[N_P];
fp=fopen("c:\\devcpp_fin\\datos\\datos.txt","r");
fp_sal=fopen("c:\\devcpp_fin\\datos\\salida.txt","w");
for(i=0;i<N_P;i++)
{
fgets(registro[i],200,fp);
sscanf(registro[i],"%lg %lg",&px[i],&py[i]);
fprintf(fp_sal,"%lg\n",&px[i]);
}
}
The problem is that doesn't write good px[i]!!
so...what's the format error??
thanks a lot!
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV