07.01.2017, 04:04
Quote:
I'm just saying that you should have suggested saving the player's name upon connecting if you always try to write better code.
I know about strcpy, but everyone has their own way of doing things, thread author uses format; therefore, I showed him how to do it with format. It's his deal whether he wants to write better code or not. But it's not like the performance difference would actually make any noticeable difference. This is something he or anyone else shouldn't be really worried about. |
If we're talking about the player name - Even that array which is used to store player name on duelinfo can be unnecessary. Because if an array is chosen to have the player's name upon connection, it can be simply returned to get the player's name wherever necessary since such an array would require change only while changing names.
I'm just concluding once again that my first post wasn't about player name, it was a suggestion to use strcpy for copying strings. You may have used format since the OP used it, though it was never meant to state that you didn't know about strcpy.