2017-10-17から1日間の記事一覧

C++ REST SDK サンプル Bing検索

#include <cpprest/http_client.h> ... // Create http_client to send the request. http_client client(U("http://www.bing.com/")); // Build request URI and start the request. uri_builder builder(U("/search")); builder.append_query(U("q"), U("cpprestsdk github")); au</cpprest/http_client.h>…

char16_t / char32_t の std::string型

std::u16string s16 = u"𠮷野家"; std::u32string s32 = U"𠮷野家"; ネタ元 https://cpprefjp.github.io/lang/cpp11/char16_32.html

C++ 文字リテラル

char 型のナロー文字リテラル。たとえば 'a' wchar_t 型のワイド文字リテラル。たとえば L'a' char16_t 型のワイド文字リテラル。たとえば u'a' char32_t 型のワイド文字リテラル。たとえば U'a' ネタ元 https://msdn.microsoft.com/ja-jp/library/69ze775t.…

C++ による base64 エンコード/デコード

元サイト http://yano.hatenadiary.jp/entry/20100908/1283945820 消えたら困るのでメモ base64.hpp #ifndef BASE64_HPP_20100908_ #define BASE64_HPP_20100908_ #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include <string> #include <vector> na</vector></string>…

C++ REST SDK visualstudioでのインストール方法

nuget使う「cpprestsdk」で検索。インストール ネタ元 https://github.com/Microsoft/cpprestsdk/wiki/How-to-use-the-C---Rest-SDK-NuGet-package