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");
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");
You just have to read from your file descriptor:
float value;
fscanf(child, "%f", &value);