GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: No Line Numbers


A Paste by jake`
1
 
#include <string>

inline std::wstring widen (std::string const& s)
{
    return std::wstring (s.begin (), s.end ());
}

inline std::string narrow (std::wstring const& s)
{
    return std::string (s.begin (), s.end ());
}

int main (int argc, char* argv [])
{
    std::string s = "hello world";
    std::wstring s1 = widen (s);
    std::string s2 = narrow (s1);
}