#include<iostream>#include<string>#define o std::coutint main() { auto s = ""s; std::cin >> s; for (char c : "2468") for (char& k : s) if (k == c) { o << (&k - &s[0]) << ',' << c; return 0; } o << "-1,8";}
637829
prog.cpp: In function ‘int main()’: prog.cpp:5:14: error: unable to find string literal operator ‘operator"" s’ auto s = ""s; ^ prog.cpp:8:24: error: unable to deduce ‘auto&&’ from ‘s’ for (char& k : s) ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!