I would like to write out to a file , float values, so that I can read it back in this way. How can I write it out to file as float. I have tried writing it out previously, but i can do it as char (and read it back as char).
outFile <<isInShape(x,y,z); //this writes out as char
How about for floats?
this is how i want to read it in:
FILE *fp = fopen(filename, "rb");
float *data=(float*) malloc(size);
size_t read = fread(data, 1, size, fp);