As I am new to Visual C++, there are so many types for handling string. When I use some type and go ahead with coding but on next step, there are in-build functions that use other types & it always require to convert one type of string to other. I found so many blogs but so confused when see so many answers & try but some are working & some are not.
Please give your answer or links that gives ultimate solution for handling different types of strings in visual c++.
That depends on what you are doing. Its a pain and no mater what you do you will have to deal with conversion.
For the most case the std::string class will suite almost any need and is easly readable by anyone accustomed to c++.
If you are using MFC cstring would be the most often seen and the normal choice
For C++ Cli System::String is the standard
All windows api that take strings expect null terminated cstyle string however depending on what frame work you are using you may not have to call many APi’s directly especially if you are using .net
I believe there is another couple of string classes in ATL but I have not used that library much.