vector problem

Is newones.end() number???

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  while (w<newones.end())
        {
            if(w==a)
                {
                    continue;
                }
            fout << newones[w].name << "\n";
            fout << newones[w].job << "\n";
            fout << newones[w].age << "\n";
            fout << newones[w].address<< "\n";
            fout << newones[w].gender << "\n";
            fout << newones[w].hobby << "\n*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*\n";
            w++;
        }
        fout.close();
}
Assuming that newones is an std::vector, then no, the member function end() does not return a "number".

It returns an iterator.
http://www.cplusplus.com/reference/vector/vector/end/
Topic archived. No new replies allowed.