So i have been learning how to overload>> after making my own structs. So i am currently trying to add info from a text file into my struct. However one of the structs is in int format but the numbers i get from the textfile is in string so i am trying to convert them to int using stoi function.
TEMPziptot looks like it is all numbers but it also looks like there might be a last line that is empty. Maybe this is making it crash? It crash in the beginning of the program and i cant run my program at all.
if i remove the code on line 26 it works just fine but then i cant add the numbers to my struct since it need to int format and not string format.
Thanks, that worked perfect for me. However i decided to no use else her since i dont need to return a bad marker value, it is just better for the empty line to "disappear".