when you get to line 18 for the first time grades is not initialized - so behavior is undefined.
You need to increase warning level and pay attention to the compiler warnings
Your letterGrade...
Type: Posts; User: vart
when you get to line 18 for the first time grades is not initialized - so behavior is undefined.
You need to increase warning level and pay attention to the compiler warnings
Your letterGrade...
on line 21 you are creating vector INSIDE the loop.
So you create vector for each iteration and then initialize only one item of the vector.
If you need only one int - use one int and not...