int main(){
string s = "str";
int i = 3;
char c = 'c';
DISP(cout,s,i,c); // cout << s << " " << i << " " << c << endl;
return 0;
}
型が違うため私にはうまくできません…
int main(){
string s = "str";
int i = 3;
char c = 'c';
DISP(cout,s,i,c); // cout << s << " " << i << " " << c << endl;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
#define DISP ~
template <class T>
ostream &operator,(ostream& ost, const T& value) {
return ost << value << " ";
}
ostream &operator~(ostream& ost) {
return ost << endl;
}
int main() {
string s = "str";
int i = 3;
char c = 'c';
DISP(cout,s,i,c); // cout << s << " " << i << " " << c << endl;
return 0;
}