タグ

関連タグで絞り込む (3)

タグの絞り込みを解除

tipsとcppに関するzakkym13のブックマーク (1)

  • 青島のしま〜Blue Islands〜 : C++ Tips

    ・DirectX Tipsはこちら(作成中..) コンストラクタのオーバーロード C++では,あるコンストラクタから,違う引数のコンストラクタを呼び出すことはできない. そこで,他の関数をつくりそれを呼び出すようにすればよい. class Foo { public: Foo(int a, int b) { set(a, b); } Foo(int a) { set(a, 0); } protected: Init(int a, int b); } std::stringでsprintfやCString::Formatのようなことをしたい 以下のようにすればできます #include <windows.h> #include <string> #include <iostream> using namespace std; int Format(std::string& dest, c

  • 1