this is my problems:
51:16 C:\Users\ekkiang\Desktop\miniproject.cpp [Warning] unknown escape sequence '\S'
[Linker error] undefined reference to `IntroPage()'
51:16 C:\Users\ekkiang\Desktop\miniproject.cpp ld returned 1 exit status
this is my coding:
/*create user-define functions
this is a user define demo*/
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
void CountOnRun(); //step2 function prototype
void CountOnSpot(); //step2 function prototype
void LetGo(); //step2 function prototype
void CleanUp(); //step2 function prototype
void IntroPage();
void SelectionMenu();
int main()
{
IntroPage();
SelectionMenu();
printf("\n");
system("pause");
return 0;
}
void intropage()
{
system("cls"); // clear previous screen
printf("\tC Programming Miniproj Intropage\n");
printf("\t=================================\n");
printf("\tModule Group: A7\n");
printf("\tTasks & members:\n");
printf("\tCount On Run -- Tan Ek Kiang\n");
printf("\tCount On Spot -- Tan Ek Kiang\n");
printf("\tLet Go -- Tan Ek Kiang\n");
printf("\tClean Up -- Tan Ek Kiang\n");
printf("\tPress any key to continue . . .");
getch();
}
void SelectionMenu()
{
char keynum;
do
{
system("cls"); // clear previous screen
printf("\Selection Menu\n");
printf("1. Count On run\n");
printf("2. Count On Spot\n");
printf("3. Let Go \n");
printf("4. Clean Up\n");
printf("5. Exit\n");
printf("Enter your selection here: ");
scanf(" %d",&keynum);
keynum=getch();
after a added t after the backslash this problem still exists...
[Linker error] undefined reference to `IntroPage()'
51:16 C:\Users\ekkiang\Desktop\miniproject.cpp ld returned 1 exit status
In this, you are getting a number into keynum (NOT A CHARACTER) which will probably not be what you want. Then, you are changing it to the character after what you entered (probably a \n) which will make you unable to enter any of your if statements.
Btw, please unlearn conio.h, it's a crappy header file that sucks, and don't use System().