fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. std::string s1 = "abc", s2 = "def";
  6. std::string m = s1 * s2;
  7. std::cout << m << endl;
  8. return 0;
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:6:24: error: no match for ‘operator*’ (operand types are ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’})
     std::string m = s1 * s2;
                     ~~~^~~~
stdout
Standard output is empty