#include <iostream> const char endl = '\n'; class myOutText{ public: myOutText& operator<<(auto s){std::cout << s; return *this;} }; myOutText cout; int main() { double a = 303, b = 20.0; cout << a+b << (a-5)*2+b-3 << endl << "ABCabc" << endl; return 0; }
推荐一个线上编译器Wandbox.org,支持几十种编程语言,比如以上代码的分享地址为:
https://wandbox.org/permlink/nPmCblNmvqvopJ0v
打开有点慢,建议用Chrome浏览器