#include <vector>#include <iostream>int main(void){ std::vector<int> container = {11,3,5,6,200}; for (size_t i = 0; i < container.size(); ++i) { if(container[i]==5) printf("Position:"); printf([i]+1); } return 0; }
Standard input is empty
prog.cpp: In lambda function: prog.cpp:10:40: error: expected '{' before '+' token prog.cpp: In function 'int main()': prog.cpp:10:41: error: no match for 'operator+' in '{i} + 1'
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!