I've been trying a bunch of different ways, but I can't figure it out. The declaration that I was given is:
const std::vector<std::string>&,
I've been trying to do this:
gradeReported.push_back(firstEntry);
I keep getting an error. I am pretty sure it has something to do with the const nature of the vector. Help would be appreciated!
You don't. If it's const
, it cannot be modified. You need to make a copy or take it by non-const reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With