Hello,
I'm trying to make a code that acts as a simple menu for a number of programs. What I was wondering was how do I include the .ccp files and run them in the menu program. Here's what I have so far:
#include <stdio.h>
#include <stdlib.h>
#include "1.cpp"
#include "2.cpp"
#include "3.cpp"
#include "4.cpp"
int main()
{
int select;
printf("Assignments\n");
printf("-----------\n\n");
printf("1. Multiple of 5\n2. Calculator\n3. Rock, Paper, Scissors\n4. No Vowels (incomplete)\n7. Exit\n");
scanf(" %d", &select);
switch(select)
{
case 1:
a1();
break;
case 2:
a2();
break;
case 3:
a3();
break;
case 4:
a4();
break;
default:
printf("That's not a choice.\n");
break;
}
system("PAUSE");
return 0;
}
I've placed all the files in the same folder and also created a project. I also tried putting the full file name for each file but I kept getting the same error: multiple definition of `a1()'
or a2(), etc...
Any help will be greatly appreciated.