- #1
Linda8888
- 7
- 1
- Homework Statement
- Explain what is wrong with the following code fragment(other than missing #include) and write down the change(s) that you will make to fix the problem(s).
- Relevant Equations
- I'm not sure what does "using" means at the second but I guess it is wrong.
C++:
using namespace std;
using vit = vector<string>::iterator;
void print(const vector<string>& s) {
for(vit it = s.begin(); it != s.end(); ++it ) {
cout << *it << endl;
}
}
Last edited by a moderator: