Go Down

Topic: Int to char*... (Read 619 times) previous topic - next topic

PeterH


Hello, try:


What's the difference between this:
Code: [Select]

fecha[19] = 9 + '0';

... and this?
Code: [Select]

fecha[19] = '9';

I only provide help via the forum - please do not contact me for private consultancy.

KeithRB

The former allows you to use a variable instead of the 9, the latter won't.

i.e., this won't work:

int this_is_a_variable = 9;
fecha[19] = 'this_is_a_variable';

Go Up