fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. std::vector<std::string> process(){
  6. return {"A","B","C","D"};
  7. }
  8.  
  9. std::vector<std::string> process2(){
  10. return ({"A","B","C","D"});
  11. }
  12.  
  13. int main() {
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'std::vector<std::basic_string<char> > process2()':
prog.cpp:10:29: error: expected ';' before '}' token
     return ({"A","B","C","D"});
                             ^
prog.cpp:10:29: error: could not convert '((void)0, ((const char*)"D"))' from 'const char*' to 'std::vector<std::basic_string<char> >'
stdout
Standard output is empty