to use char array as a string we should include cstring na sir has not incuded that but then also code is working why ?
I am confused btw cstring vs cpp string vs char array
Character array vs string
but sir later used inlcude sting why
?I am confused btw this when to include what ?
and when should iinclude cstring ,string and when not?
so we can also use char array function like strlen or string function a.lenght()?
@guptashubham210a for accessing functions you need cstring.
you will get what to use in some of the days with constant use
also there is a header file which includes all the files
bits/stdc++.h
but when we should include string only?
@guptashubham210a never included it in c++ i dont think its used now .
and just keep using char arrays and strings you would automatically know what to use.
like if you use something and there’s a error google the header file in this way you will get to know about lots of headerfiles
bits/stdc++.h
in this do we need to include/or write using namespace and include iostream or bits/stdc++.h contains all stl,containers?
like this