トルネード

毛利のメモ書き

2016-10-12から1日間の記事一覧

std::wstring to byte[]

VC++2015の場合 #include "stdafx.h" #include <string> #include <iostream> #include <memory> #include <sstream> #include <locale> using Byte = char; using PByte = std::shared_ptr<Byte>; PByte WstrToChar(std::wstring& s1) { unsigned int iLength = s1.length() * 2 + 1; PByte result_{new Byte[</byte></locale></sstream></memory></iostream></string>…