If you're using LPCWSTR in the first place, you should also be using std::wstring rather than std::string. Then you can just use the c_str() method from std::wstring directly. It's certainly possible to convert the latter into the former, but it's fair to say that not having to do a conversion is the better option if you can manage it:
But, in continuation to deceptikon's reply, if you just want to be able to call ShellExecute while enabling you to pass your sProgramName variable as an argument, you can use its ANSI version without much hassles, e. g. ShellExecuteA(NULL, NULL, &sProgramName, NULL, NULL, SW_SHOW);
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"