2011-05-19から1日間の記事一覧

フレンド関数テンプレート

C++

#include "stdafx.h" class Hoge { public: // フレンド関数テンプレートの指定。 template <class T> friend void CallHogeEcho(Hoge&, T); private: void Echo(int x) { printf("Hoge: %d\n", x); } void Echo(const char* x) { printf("Hoge: %s\n", x); } }; temp</class>…

ライブラリの出力名を変える。

ライブラリの出力ファイル名を MyLibrary_x86_Debug.libていう感じにしたい。 更に、↓の感じのディレクトリ構成にしたい。 MyLibrary MyLibrary.sln MyLibrary MyLibrary.vcxproj lib MyLibrary_x86_Debug.lib MyLibrary_x64_Debug.lib MyLibrary_x86_Releas…