tags:

views:

12

answers:

2

How can I write the output of this line of code to a float variable instead of piping it to a file? The output of this line is a floating number.

FILE  *child = _popen("java -jar c:\\simmetrics.jar c:\\chtml.txt c:\\thtml.txt", "r");
+1  A: 
double d;
fscanf(child, "%lf", &d);
Marcelo Cantos
+1  A: 

You just have to read from your file descriptor:

float value;
fscanf(child, "%f", &value);
mouviciel