# include & lt; Iostream>
# include & lt; Vector>
Using STD: : vector;
using namespace std;
Int main ()
{
Int s;
int i;
Vector
While (cin> S)
{
The text. The push_back (s);
}
I=the text. The size ();
If (I % 2==0)
{
For (vector
cout
}
The else
{
cout<" The last element no sum, value is: "& lt;
return 0;
}
Compile time appear the error:
The error C2296: '-' : illegal, left operand has the type 'unsigned int (__thiscall STD: : vector
Pray god give directions
CodePudding user response:
For (vectorFor (vector
While I for odd number, no execution sum operation, the text [I] subscript overrun
CodePudding user response:
Thank you, run successfully