@kevin001 If you want to convert the char to int and a character '1' provides a ascii number that's not 1, you need to remove the offset '0' to realign it to count from 0-9.
Going from int to std::string to char* isn't the same as int to char*.
int length = 10; char len = length + '0'; printf("%c", len); This gave me : for 58 on the ascii chart not 10 that I wanted. The ascii chart shows that int 10 is
int id; char name[NAME_LEN]; int money; head = (bank *)malloc(sizeof(bank)); tail = (bank *)malloc(sizeof(bank)); head->next = tail; tail->next
Then you just copy each char into the buffer and terminate the buffer with \0. – kaylum Aug 3 '15 at 2:03.
I have a char that is given from fgets, and I would like to know how I can convert it into a char*. I am sure this has been posted before, but I couldn't find one that was doing quite what I wanted to do.
Задание: 73 (Serge I: 2009-04-17). Для каждой страны определить сражения, в которых не участвовали корабли данной страны.
I am trying to convert an integer to a char.. How can I do this..?
char writeThingspeak(char fieldNumber, char result).