Hi I have text file. The columns in the text file are separated by whitespaces.This text file consists of the floatig point values. I want to save each column in the separate array and find the minimum and maximum from each column.Number of columns and rows are not fixed and I want to write this code using c++. Thanks.
Hi I have text file. The columns in the text file are separated by whitespaces.This text file consists of the floatig point values. I want to save each column in the separate array and find the minimum and maximum from each column.Number of columns and rows are not fixed and I want to write this code using c++. Thanks.
Hi all, What would be the most efficient way to save an array of floats to a file (in text format)? At the moment, my code looks like: /* * Saving an array of floats to a file */ void save(char* filename, float* src, int limit) { FILE* fp = fopen(filename, "w"); if (fp != NULL) { register int i; for ...
I am working on arrays ? I want to find 3 consecutive occurences of 0xaa in my array. Array starting address (0x100 to 0x400). all i need to do to determine how much stack has been used is to walk through the memory, starting at the top (0x4FF), until we find an area containing 0xAA. Now, a single 0xAA could still ...
hi there, can anyone advice please possibly by example code or the like on how i can save contents from an array into file and increment on each iteration i.e. after 1st iteration, contents of array saved and labelled as file001.txt and then next iteration file002.txt and so on... i know i can use fstream which i read and write, have ...
#include #define SIZE 5 int main() { int a[SIZE] = {1,2,3,4,5} ; int char1 ; FILE *fp1 ; fp1 = fopen("F:\\output.txt", "w") ; int i; for(i = 0 ; i < SIZE; i++) { char1 = a[i] ; putc(char1, fp1) ; } fclose(fp1); printf("%d", char1); return 0 ; } there are no errors but i get the below in output ...