CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Codeplug

Search: Search took 0.17 seconds.

  1. Re: Problem with converting std::string to CString

    CStringA a = "Hello";
    CStringW w = L"World";

    wcout << static_cast<const wchar_t*>(a) << endl; // always an error
    cout << static_cast<const char*>(w) << endl; // always an error

    ...
  2. Re: Problem with converting std::string to CString

    I believe you meant LPCSTR, or ...


    cout << "sMPIP: " << static_cast<const char*>(sMPIP) << endl;
    Since cout is char based.

    Do the same for printf("%s") parameters.

    Here's how to use...
Results 1 to 2 of 2





Click Here to Expand Forum to Full Width

Featured