Hi there, I am currently converting a matlab file to C, and need some help writing the data calculated in 2D arrays to files. This is what i ahve done so far: File *U; File *V; File *X; File *Y; U = fopen("U.txt", "w"); V = fopen("V.txt", "w"); X = fopen("X.txt", "w"); Y = fopen("Y.txt", "w"); float U[N][N];
Here i do some calculations to fill the array with the new values. i am not too sure how to make it write to the file...i have done this so far..
for (int i=0; i
how bout using fwrite()?
create a stream for file out put and write to that stream like u would with cout