Hi, I have this simple code:
const int kiCharSize=30;
const int kiDate=7;
struct Customer{
char caName[kiCharSize];
char caSurname[kiCharSize];
char caCity[kiCharSize];
char caPhone[kiCharSize];
char caDate[kiDate];
char cDay;
enum eDay{M,A};
char caBrand[kiCharSize];
};
blablabla
Customers::Customers(int x){
switch(x){
case 1:
Cust.caBrand="HolyBrand";
Cust.caCity="Heaven";
Cust.caDate="110205";
Cust.caName="Jeesus";
Cust.caPhone="999333999";
Cust.caSurname="HolySpirit";
Cust.cDay='M';
break;
case 2:
Cust.caBrand="Brandutsu";
Cust.caCity="Japan";
Cust.caDate="110205";
Cust.caName="Naruto";
Cust.caPhone="123456789";
Cust.caSurname="Uzumaki";
Cust.cDay='P';
break;
case 3:
Cust.caBrand="DeadSoDead";
Cust.caCity="Graveyard";
Cust.caDate="110206";
Cust.caName="Undertaker";
Cust.caPhone="000000000";
Cust.caSurname="Grimreaper";
Cust.cDay='M';
break;}
}
And getting this simple error:
Error 1 error C2440: '=' : cannot convert from 'const char [10]' to 'char [30]'
For all the lines.
So how Do I assign a name, a string to a char[kiSize] Declared before?
THank you.