this is coming off a program that collects information and saves it after every command. I have opened my file successfully cause thats how it reads the client. the problem is saving the data. Does this code look right to everybody??? I am running in C and very very basic. I am very new, but anyways let me know what you think!
Thanks
void SaveData (char Name[], double E_Data[]) {
// Local Variables
double endofFile = 0.0;
double FileValue = 0.0;
FILE *fileHandle;
int i = 0;
// Begin
//Get File
fileHandle = fopen(Name,"w");
if (fileHandle == NULL){
printf("\nSaving Error!\n");
} //end if
else{
for (i = 0; i < 18; i++){
fprintf(fileHandle,"%f ",E_Data[i]);
} // end for loop
} // end else statment
fclose(fileHandle);
} // end SaveData