String shrinking and Autonumber
In a program I am currently creating, users are saved into a file. Is it possible to set it so that a user is automaticly given a membership number in the format XXX, but there has to be three numbers. So user 1 would be, 001.
Also can you shrink a string. So if I have declared a string as string[30], but the user puts in a filename, such as file.txt, can I remove the .txt extension from the string.
Re: String shrinking and Autonumber
Quote:
Originally posted by Necrodeemer
In a program I am currently creating, users are saved into a file. Is it possible to set it so that a user is automaticly given a membership number in the format XXX, but there has to be three numbers. So user 1 would be, 001.
Also can you shrink a string. So if I have declared a string as string[30], but the user puts in a filename, such as file.txt, can I remove the .txt extension from the string.
For the second part you can make a new pointer where you store the name withought the .txt and then you delete the first pointer that has the name and the .txt
This is what I understood for the first part, do you have anything about the second part?