p_candy.brand = "japp";, which attempts to assign an array of 5 const char (four letters and a null char) to the array of 20 char cannot be compiled.
|But i cant assaign it like that.guess i have to read the Array chapter again to understand why.|
Edit: Figured it out myself.
Should have used something like strcpy(p_candy.brand , "japp");
std::stringclass has an overloaded assignment operator, which essentially has code that copies chars individually from one object to the other.
cout, or processing things individually when there is an algorithm that does it for you.
std::stringhas lots of very handy things, as does all of the STL.