That would hold true if the array constants were also the names of the variables I was trying to pass to, but here:
Originally posted by Earth_King
Opse! I did not see that Feat1 or Feat2 are array constants.
Since Feat1 is name of char array and Feat1 is constant; so
you are not able to modify after it initialize.
It not allow to modifyh Feat1 = (char) p;
Feat1 is always allow on the righthand assignment (RH value).
In other words, what I am trying to pass to are just more char type variables, not the arrays themselves.
Also, in main() you'll see what I mean...
Does that make a bit more sense?
cout << "What is the Monster Name? ";
cin >> Name;
cout << endl;
cout << "AC: " << AC << endl;
cout << "HP: " << HP << endl;
cout << "CHR: " << CHR << endl;
cout << "CON: " << CON << endl;
cout << "DEX: " << DEX << endl;
cout << "INT: " << INT << endl;
cout << "STR: " << STR << endl;
cout << "WIS: " << WIS << endl;
cout << "Feats: " << Feat1 << " " << Feat2 << " " << Feat3 << " " << Feat4 << " " << Feat5 << endl;
cout << "Traits: " << Trait1 << Trait2 << Trait3 << Trait4 << Trait5 << endl;
cout << "\n\nHit q to quit: ";
cin >> x;
Trying to pass a string from an array (feat1) to a pointer (pf1) to a char global (Feat1).