Your j decreases by 1. Then j is destroyed then a new one is created on the next iteration. You could simply do for(int i = 3; i >= 0; --i) or cout << "Please enter your PIN (" << 3 - i << ") tries left: "; Also, when you say Access granted you are probably going to want to break out of the loop.
I would like the (main) program to completely end after all tries have been used up, but just finish to the end of the function if the password is correct. I don't know where to put exit(0); at.
There are a few things you could do the easiest would be to put an if before the exit(0) to check if i == 0. Alternatively make the i from line 20 local to the if statement before the for loop. Then after the for loop you would check if pin == u1.servicePin and if not then you would exit. The best solution would possibly be to return from the function weather the password is correct or not. Something like return pin == u1.servicePin then based on the return value you would exit or not after calling the function.