can u tell me a little more abt y r u implying this here.. if possible?

by the way cstring is not working with my c++ compiler

as it is for visual c++ i hope!!!

That function turns a string object into a char array. That is needed because open() function wants a char array, so if you put a string it will complain. But since you put the c_str() function, that makes it into a char array, so it works.