V
v4vijayakumar
why the following program is not working as expected?
#include <iostream>
using namespace std;
int main()
{
string t("test");
wcout << (wchar_t *) t.c_str() << endl;
wcout << t.c_str() << endl;
wstring t2 = (wchar_t *) t.c_str();
wcout << t2.c_str() << endl;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
string t("test");
wcout << (wchar_t *) t.c_str() << endl;
wcout << t.c_str() << endl;
wstring t2 = (wchar_t *) t.c_str();
wcout << t2.c_str() << endl;
return 0;
}