Hello,
i’m using Sublime editor to run my codes. I just use .x (name of the code.cpp) and my code runs at the terminal. But when i try to run it again i receive this message:
note: previous definition is here
auto pVec = [](const doubles& v){for (auto&& x:v) cout << x << e...
^
My code is:
{
using doubles = std::vector<double>; //using doubles like a vector type;
auto pVec = [](const doubles& v){for (auto&& x:v) cout << x << endl;}; //
doubles v{0,3,5,4,1,2};
pVec(v);
}
I know what is going on but i don’t know how to solve it. I have to delete pVec but i don’t know how to do.
Thanks!