2006-03-09から1日間の記事一覧
でっちあげてみた。 id:wata_d:20060309:1141873430 と同じ事を C++ で。 #include #include template class Delegater { std::vector > func_; public: Delegater() {} template Delegater(const U& f) { func_.push_back(f); } template Delegater& operat…
int main(array ^args) { int src = 100; Console::WriteLine(src); int% tracking = src; // tracking reference handle tracking = 200; Console::WriteLine(src); return 0; } 実行結果: 100 200 参照と同じようなものだという認識でいいのかな。 * -> ^ …
public delegate void print(); void hoge_print() { Console::WriteLine("hoge"); } void hige_print() { Console::WriteLine("hige"); } int main(array ^args) { { print^ p = gcnew print(&hoge_print); p += gcnew print(&hige_print); // ! p->Invoke(…
MSDN2 を眺めていると随分と以前のバージョンから変わっているんですね。手元の VS2003 の MSDN は見ない方がいいかな。でも MSDN2 は所々翻訳されていないようで、英語版ではページがあっても日本語版ではまだなかったりするものもある模様。なるべく英語版…