- why c_str is used after searching i got to know c_str is used to convert a string to cstring which can be used in old c functions and so why in particular (char *)str.c_str() is used??(i remeber in video sir mentioned its underlining array but i am unable to understand it beside same thing was not done in previous lectures while using strok though there datatype was not string)
2)why pair is used to store key and string in generall ,can we use vectors or map ? was there any advantage of pair over them?