   I hate char arrays >_<
  ok ive got something like this.void setName(char Name){itsName = Name;};and I get this errorc:\my documents\c++ programs\mybattle\main.cpp(166) : error C2664: 'setName' : cannot convert parameter 1 from 'char [8]' to 'char'   This conversion requires a reinterpret_cast, a C-style cast or function-style castI beleave it has something to do with how you declair the char arrays or what not but my book is not helping at all.  Please help, thanks (gawd this has gota be my millionth question )[edited by - Dko on January 24, 2004 5:26:42 PM]
  void setName(char* Name) instead of void setName(char Name)? ;  You''re also going to have to treat them as dynamic arrays since you don''t know how big the person''s name is.  I''m still trying to figure this out myself, but look up calloc and realloc in your book or online.  Those should be what you''re looking for to set the array up to be the right length whenever you need to change the name. ;  strlen is your friend ;  Gday,You might want to look at the string class in the std namespace, it can help with general string options a lot.you can declare like thisstd::string Name = "Freak";or if you have using namespace std; before it than you can just call string Name = "Freak";that way you are not using and memory copy functions and all that stuff that is really a pain...Wait until you need to convert char arrays to unicode, then you will get nose bleeds.if you are using char though then here a few handy hints.You cna declare like this,char * Name = "jack";char Name[]="jack";look up functions like strcpy, strcat, itoa and so forth.good luck ;  Still can''t figure it out.  Here''s my character.h and the line that generates the error in main.cpp #include <iostream>#include <stdlib.h>using namespace std;class Creature{public:void setName(char Name){itsName = Name;};void setHp(int Hp){itsHp = Hp;MaxHp = itsHp;};void changeHp(int Hp){itsHp = Hp;};void setAtk(int Atk){itsAtk = Atk;};void setDef(int Def){itsDef = Def;};void setSpd(float Spd){itsSpd = Spd;};void setATB(float ATB){itsATB = ATB;};int CalculateATB(){this->setATB(this->itsATB + (96 * (this->showSpd() + 20)) / 16);  // My riped off ff3/6 formule :Pif (this->itsATB >= 65535)return 1;return 0;};int EnterName(){cout << "Please enter your characters name\n";char nameTemp ;cin >> nameTemp;this->setName(nameTemp);};char showName(){return itsName;};int showHp(){return itsHp;};int showMaxHp(){return MaxHp;};int showAtk(){return itsAtk;};int showDef(){return itsDef;};float showSpd(){return itsSpd;};int showATB(){float NumOfBars = 10;float interval = 65535 / NumOfBars;float bars = itsATB / interval;cout << "(";for(int i = 0; i < bars; i++)cout << "|";for(float j = bars; j <= NumOfBars; j++)cout << "-";cout << ")";return 0;};private:char itsName;int itsHp;int MaxHp;int itsAtk;int itsDef;float itsSpd;float itsATB;}; Monster.setName("Monster");;  The char type is just one character. To have more than one character (strings) you''d need to use char* like ch1pz mentioned   ---------------------Ryan Bujnowicz[ vangelis ] ;  Ok now the prob I get is this warrningc:\my documents\c++ programs\mybattle\character.h(30) : warning C4700: local variable ''nameTemp'' used without having been initializedand the program crashes when ever I enter a name ;Did you initialize it in all the functions inwhich it is called? ;  void SetName(char * newName){ int len; len = strlen(newName); delete [] name; name = new char[len]; strcpy(name,newName);}