Sorry I have no updated this in a while, I got carried way with other things. Anyways, I keep getting a segmentation fault when I run my program. Here is my code:
Code:
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
int main (int argc, char *argv)
{
FILE *fp;
float q;
int m;
fp=fopen("C:\\Users\\MyName\\Desktop\\Matrices\\matrixA.bin", "rb");
m=fread(&q, sizeof(q), 1, fp);
printf("\n%f and %i \n\n", q,m);
fclose(fp);
return 0;
}
Any idea whats wrong? And just to clarify, I said I was reading in two bytes before (which I still am going to need to do) but for now I am just doing one.