Generation

generate functionMon, 17 Apr 2023

Make vector and return second element

vector<int> makeVector() { return {1, 2, 3}; } int getSecondElement(const vector<int>& v) { return v[1]; } getSecondElement(makeVector());

Questions about programming?Chat with your personal AI assistant