This might sound complicated but PLEASE bear with me!
What I am doing is giving the user the choice to save a file in a number of ways...
if (Select==1)
BasicSaveStructure(), SaveNormal();
else if (Select==2)
BasicSaveStructure(), Save90();
else if (Select==3)
BasicSaveStructure(), Save180();
else if (Select==4)
BasicSaveStructure(), Save270();
else if (Select==5)
BasicSaveStructure(), SaveInvert();
else if (Select==6)
BasicSaveStructure(), SaveInvert90();
else if (Select==7)
BasicSaveStructure(), SaveInvert180();
else if (Select==8)
BasicSaveStructure(), SaveInvert270();
else if (Select==9)
main();
ie. what the user selects then it will go to that particular section. All options to go the first section which deals with the basic of saving a file...
printf("Please enter the name of the file to save your image: ");
gets(Filename);
OutputFile=fopen(Filename, "w");
if (OutputFile==NULL)
{
printf("Cannot save file of that name\n");
printf("The program will now end\n");
GetInteger();
exit(1);
}
printf("\nImage file has been successfully saved\n");
printf("Press any key to return to the main menu\n");
GetInteger();
after that i need to go to the corresponding function to save the file in the way the user wants it. What I don't know is how to run the contents of a function and save it at the same time. I have included one of the functions that I am using in my program...
void Rotate90(void)
{
clrscr();
for (i=0;i<ROWS;i++)
for (j=0;j<COLS;j++)
Picture2[COLS-1-j][i]=Picture[i][j];
}
but i don't know how to call that function and perform the save section at the same time.
***THANK YOU SO MUCH FOR ANY HELP ON THIS SUBJECT***