can you help me out with this code i was workin on, it says ther is an error and i cant seem to find it
thanks
Code:// Destiny1.cpp : Defines the entry point for the console application. #include <conio.h> #include <stdlib.h> #include <iostream.h> using namespace std; int two=2; int zero=0; int *hp; int *xp; int *ac; int *dmg; char *nme; char *cls; char *rce; int chrdefine() { //Name char name[100]; cout << "Name: "; cin>>name; nme=name; //Class system("cls"); cout << "Class: " <</n; cout << "1. Mage" << /n; cout << "2. Fighter" << /n; cout << "3. Monk" << /n; cout << "Other Key To Quit" << /n; int ch1=getch(); switch(ch1) { case 1: cls="Mage"; break; case 2: cls="Fighter"; break; case 3: cls="paledan"; break; default: return 0; break; } //Race system("cls"); cout << "Race: " << /n; cout << "1. Human" << /n; cout << "2. Elf" << /n; cout << "3. Halfling" << /n; cout << "4. Half-Elf" << /n; cout << "5. Half-Orc" << /n; cout << "6. Orc" << /n; cout << "7. faery" << /n; cout << "Other Key To Quit" << /n; char ch2=getch(); switch(ch2) { case 1: rce="Human"; break; case 2: rce="Elf"; break; case 3: rce="Halfling"; ac=&two; break; case 4: rce="Half-Elf"; break; case 5: rce="Half-Orc"; break; case 6: rce="orc"; break; case 7: rce="faery"; break; default: return 0; break; } //Xp xp=&zero; //Hp int random=rand()%10; random=random+11; hp=&random; return 0; } int main() { chrdefine(); cout << "HP: " << *hp << /n; cout << "Name: " << *nme << /n; cout << "Race: " << *rce << /n; cout << "Class: " << *cls << /n; cout << "EXP: " << *xp << /n; cout << "AC: +" << *ac << /n; cout << "Damage: " << *dmg << /n; return 0; }



LinkBack URL
About LinkBacks


