Replace line in txt file c++
问题 I just wondering cause i have a text file containing STATUS:USERID:PASSWORD in accounts.txt example it would look like this: OPEN:bob:askmehere: OPEN:john:askmethere: LOCK:rob:robmypurse: i have a user input in my main as such user can login 3x else status will change from OPEN to LOCK example after 3 tries of john before: OPEN:bob:askmehere: OPEN:john:askmethere: LOCK:rob:robmypurse: after: OPEN:bob:askmehere: LOCK:john:askmethere: LOCK:rob:robmypurse: what i have done is: void lockUser