Finding an element in a vector of objects

Hi guys!
I'm writing a program to create a simple database in C++.
This program compiles, but it doesn't print any data. I think the problem is in the input files, or the find_brigadier function.
Lots of thanks to all who reed this. As I mentioned before, the problem was in the input files. It works correctly only if you write Name_Surname or NameSurname instead of Name Surname in the inpute files.
Last edited on
crueltyfree wrote:
This program compiles,

No it doesn't:
 In function 'int main()':
119:6: error: 'personname' was not declared in this scope
120:15: error: 'brigadiers' was not declared in this scope

Your main() says this
int main(){
for(int i=0;i<brigadiers.size();i++){

There is no brigadiers container to find anything of an unspecified entity in!
Last edited on
No, it compiles)
I've forgotten to give you some very important parts of the program, but now I have shared the link.
Topic archived. No new replies allowed.