Because you passed the struct by copy. Any change that you make inside the function will be local.
Pass it by reference void kromozom_hesapla(kromozom_s &krom_s). Now it's just an alias (the two object are the same)
I hope that Kromozom_boyu will be at most krom_s.size()