For instance, Let's say I have the following:
char str[] = "33MayPen5";
int length = strlen(str);
char buffer[length];
int j = 0;
for(int i = 0; i < length; i++) {
buffer[j] = // I would like to read the number 33 from str and store it in buffer[0]
j++;
}
Basically, I would like to store str[0] AND str[1] which is 33, into buffer[0]. How would I accomplish such a task? Thanks In Advance!
Please provide code which is correctly formed, you have an error on this line:
char buffer[length];
You lenght must be const. You can solve this by reading each nomber and convert it to int. But no way to store 33 at once.