#include Quest QuestList[TOTAL_QUESTS]={ Quest("Test","A test quest",0) }; Quest::Quest(){ } Quest::Quest(const char *t,const char *d,unsigned int x){ size_t len; title=(char *)malloc((len=strlen(t))); strncpy(title,t,len); desc=(char *)malloc((len=strlen(d))); strncpy(desc,d,len); xp=x; } Quest::~Quest(){ free(title); free(desc); xp=0; } QuestHandler::QuestHandler(){ ccnt=0; } int QuestHandler::assign(const char *t){ unsigned int i=0; if(ccnt==QUEST_LIMIT) return -1; for(;ititle,t)){ for(i++;ititle,t)){ j=current[i]->xp; for(i++;i