Welcome to the forum. When posting code, please use code tags so the server displays line numbers that we can refer to. Just edit the post, highlight the code and click the <> button to the right of the edit window.
That looks wrong to me. I assume you intend to keep reading the record, which means these lines should be: politician[i].annual_salary >> politician[i].saln >> politician[i].known_as >> politician[i].religion >> politician[i].implemented_law;
Line 27: You only allocate 15 elements for your politician array.
Line 36: You're attempting to read up to 50 records into your politician array. This will cause an out of bounds reference if there are more than 15 entries in your file.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.