アカウント名:
パスワード:
void SendWithMail(引数4つ); が定義されていれば、
#include <string>class Mailer{public: Mailer(const std::string& message) : message_(message) { } ~Mailer(void) { } void WithMail(void) { SendWithMail(from_, to_, pict_, message_); } Mailer& From(const std::string& from) { from_ = from; return *this; } Mailer& To(const std::string& to) { to_ = to; return *this; } Mailer& With(const std::string& pict) { pict_ = pict; return *this; }private: std::string message_, to_, from_, pict_;};Mailer Send(const std::string& message) { return message; }
で、
Send("Msg").From("Taro").To("Jiro").With("Pict").WithMail();
と書けば呼び出せます。(余計なものがちょっと付くけど。)シンタックスシュガー大好きならぜひC++信者に。
より多くのコメントがこの議論にあるかもしれませんが、JavaScriptが有効ではない環境を使用している場合、クラシックなコメントシステム(D1)に設定を変更する必要があります。
UNIXはただ死んだだけでなく、本当にひどい臭いを放ち始めている -- あるソフトウェアエンジニア
C++はいいですよー (スコア:2)
void SendWithMail(引数4つ); が定義されていれば、
で、
と書けば呼び出せます。(余計なものがちょっと付くけど。)
シンタックスシュガー大好きならぜひC++信者に。