You are assigning string literal to the char.
sorry. really very novice at c++
cant understand wht did u mean
can u tell at wht line? & wht will be correct answer?
Change your function return type,you are trying to return a string type using a char type
tnx mate works perfect :)
char
is a variable that can hold only one character,
but you're assignig to it more then one chracter:
discountPercent = "10%";
"10%"
is not of type char
, it is string literal, so you need char*
(pointer to the string) to assign all the individual characters;
Last edited on