why is the function of stats not working, as it comiles ok without errors, when I go to press S, it just quits the program without viewing the statsCode:#include<iostream> #include<conio.h> #include<string> #define noattack(); #define stats(); using namespace std; using std::cout; using std::endl; int main() { string pname; char choice; char attack; int phealth = 100; int gold = 0; int items = 0; int exp = 0; int magic = 0; int level = 1; int size; int x; stats(); void shop(); noattack(); if (exp == 3) { level=+1; cout << "You have gained a level!!\n" << endl; } else if (exp == 6) { level=+1; cout << "You have gained another level!!\n" << endl; } else if (exp == 9) { level=+1; cout << "You have reached another level!!\n" << endl; } else if (exp == 12) { level=+1; cout << "You have reached a higher level!\n" << endl; } else if (exp == 15) { level=+1; cout << "You are at a strong level!\n" << endl; } else if (exp == 18) { level=+1; cout << "You are almost at the highest level!\n" << endl; } else if (exp == 21) { level=+1; cout << "You just keep getting stronger... new level reached!\n" << endl; } else if (exp == 24) { level=+1; cout << "Penultimate level reached!!\n" << endl; } else if (exp == 27) { level=+1; cout << "You are at the maxuim level!\n" << endl; } if (phealth <0) { system("cls"); char sentgo[]="As you are struck, you fall to the floor...\n" "all of the hope for a peacful return to Faucet\n" "Is lost...\n" "\n\n" "G A M E O V E R ! ! !\n" "\n\n"; size=strlen(sentgo); for(x=0;x<size;x++) { Sleep(40); printf("%c",sentgo[x]); } Sleep(3000); exit(0); } main: system("cls"); printf("\t\t|__________________________________________|\n" "\t\t| DAISY'S QUEST |\n" "\t\t| =============== |\n" "\t\t| |\n" "\t\t| Programed By Peter Watts |\n" "\t\t| |\n" "\t\t| Press P to Play |\n" "\t\t| |\n" "\t\t| Press C to View Credits |\n" "\t\t| |\n" "\t\t| Press Q to Quit |\n" "\t\t|__________________________________________|\n"); cout << "\n\n"; cout << "Selection: " << endl; cin >> choice; if (choice == 'q') { system("cls"); char sentgq[]="Daisy hopes to see you again real soon...\n" "\n\n"; size=strlen(sentgq); for(x=0;x<size;x++) { Sleep(40); printf("%c",sentgq[x]); } Sleep(2000); exit(0); } else if (choice == 'c') { system("cls"); char sentgc[]="\n\n" "\t\tD A I S Y 'S Q U E S T\n" "\n\n" "Programed and written by Peter Watts\n" "\n\n" "Based on the idea of Mario Bros.\n" "\n\n" "Game made in all of five months!\n" "\n\n" "Thanks for playing this game, as I know text games can\n" "\n\n" "be pretty dull...\n" "\n\n" "Look out for the sequal soon!!\n" "\n\n" "\t\tF I N\n" "\n\n"; size=strlen(sentgc); for(x=0;x<size;x++) { Sleep(40); printf("%c",sentgc[x]); } Sleep(2000); system("cls"); goto main; system("cls"); } else if (choice == 'p') { system("cls"); char senta[]="Hail there adventurer!\n" "\n\n" "I want to ask you three questions\n" "\n\n" "1: Do you seek fame and fortune?\n" "\n\n" "2: Do you want to help out a poor princess?\n" "\n\n" "3: Do you want the title of a true hero?\n" "\n\n" "I know all the answers to these is YES!\n"; size=strlen(senta); for(x=0;x<size;x++) { Sleep(40); printf("%c",senta[x]); } Sleep(2000); system("cls"); char sentb[]="My name is Princess Daisy..\n" "\n\n" "But, I can't keep calling you adventurer\n" "\n\n" "now can I? So, Sir / Madame, what is your name?\n" "\n\n"; size=strlen(sentb); for(x=0;x<size;x++) { Sleep(40); printf("%c",sentb[x]); } cout << "My name is: " << pname; cin >> pname; Sleep(1000); system("cls"); cout << "So, you are called " << pname; cout << "\n\n"; char sentc[]="Nice to meet you.\n" "\n\n" "I need your assistance....\n" "\n\n" "My kingdom of Sarahasland is in terrible danger..\n" "\n\n" "I have to get to the castle to speak to my sister,\n" "\n\n" "Princess Peach. But, I can't leave my loyal subjects...\n" "\n\n" "Will you go in my place? Y/N:\n" "\n\n"; size=strlen(sentc); for(x=0;x<size;x++) { Sleep(40); printf("%c",sentc[x]); } cout << "Will you go? " << endl; cin >> choice; if (choice == 'n') { system("cls"); char sentwg[]="I am sorry that I called on your help..\n" "\n\n" "My land is now sure to collapse in the face\n" "\n\n" "of eternal hell\n" "\n\n" "YOU HAVE TAKEN THE COWARDS WAY OUT\n" "\n\n"; size=strlen(sentwg); for(x=0;x<size;x++) { Sleep(40); printf("%c",sentwg[x]); } Sleep(2000); exit(0); } else if (choice == 'y') { system("cls"); items=+1; //1 items total char sentig[]="I thank you kind one. Here, I give you a LETTER.\n" "\n\n" "You can use it to enter the village.\n" "\n\n" "Well, good luck kind one, I wish you all the best...\n" "\n\n" "What will you do now?\n" "\n\n" "Press E to explore the surrounding area\n" "\n\n" "Press A to attack\n" "\n\n" "Press S to view your stats\n" "\n\n"; size=strlen(sentig); for(x=0;x<size;x++) { Sleep(40); printf("%c",sentig[x]); } cout << "Choice?: " << endl; cin >> choice; } if (choice == 'a') { noattack() } else if (choice == 's') { stats() } noattack(); { system("cls"); cout << "There is nobody to attack\n" << endl; return 0; } stats(); { cout << "\t\tSTATUS SCREEN\n"; cout << "\n\n"; cout << "Player Name " << pname; cout << "\n\n"; cout << "Level is at " << level; cout << "\n\n"; cout << "Experience " << exp; cout << "\n\n"; cout << "Items totl " << items; cout << "\n\n"; cout << "Magic levl " << magic; cout << "\n\n"; cout << "Gold found " << gold; cout << "\n\n"; cout << "Health is " << phealth; cout << "\n\n"; cout << "Press a key to exit" << endl; getch(); } } return 0; } // end of function