I tried what you suggested and it got rid of the errors but
it doesn't run the program.
The #define made since.
How come it still want work. I am trying hard to understand this.
If this was Cobol, I wouldn't have any trouble calling another program.
Code:
/*
Menu
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "carpet.h"
#define FILENAME "c:\\mydocu~1\\pa17.exe" //Inserted this
void function1( int);
void function2( int);
void function3( int);
main()
{
void (*f[3]) ( int) = {function1, function2, function3};
int choice;
printf("0 = Carpet Information Data Entry\n");
printf("1 = Generate Reports\n");
printf("2 = Utilities\n");
printf("3 = End Program\n");
scanf("%d", &choice);
while (choice >= 0 && choice < 3)
{
(*f[choice]) (choice);
printf("0 = Carpet Information Data Entry\n");
printf("1 = Generate Reports\n");
printf("2 = Utilities\n");
printf("3 = End Program\n");
scanf("%d", &choice);
}//end while loop
printf("Program has terminated\n");
return 0;
}
void function1(int a)
{
system("cls");
printf("%d\n", a);
printf("%d\n", carpetCharge1);
}//end function1
void function2(int b)
{
system("cls");
fopen("c:\\mydocu~1\\pa17.exe", "r"); \\Correct this
printf("%d\n", b);
}//end function2
void function3(int c)
{
system("cls");
printf("%d\n", c);
}//end function3