How char array converted to string whereas here it is showing error?

you are trying to convert whole char array at once.
i corrected you code here

i know that but in that lecture sir has not written anything like that
he only did that is string(s);
where s is pointing to character array .
i don’t understand this thing

Bro the same thing happened with me.In one problem in 10 Days of code i dint able to solve.
I looked up to his lecture and i coded along with him even variable name not changed.But he gets output and mine wont.And nobody solves the doubts for a lite batch