I've got a really simple problem but I cant work it out. I'm using straight C.
I need to make a string that will be in the form A555.txt where A is a letter and 5's are digits.
So i've defined a string like; char myString[8];
I can set the letters and the .txt extension by doing:
myString[0] = 'A'
myString[4] = '.'
myString[5] = 't' etc
But the digits are proving to be a problem. I've got an integer variable that will be 3 digits long that I want to put into the string in locations 1,2 and 3, but I cant do it. How can I put it into my string?
Sorry for the stupid question and thanks for any advice.
I need to make a string that will be in the form A555.txt where A is a letter and 5's are digits.
So i've defined a string like; char myString[8];
I can set the letters and the .txt extension by doing:
myString[0] = 'A'
myString[4] = '.'
myString[5] = 't' etc
But the digits are proving to be a problem. I've got an integer variable that will be 3 digits long that I want to put into the string in locations 1,2 and 3, but I cant do it. How can I put it into my string?
Sorry for the stupid question and thanks for any advice.