mardi 30 août 2016

Initializing a char with an int in C

I am new to C programming and would like to create a char that puts text before an int.

char charPin[] = ("PIN%d",pin);

I want it so I can pass charPin to an external function. I am receiving an invalid initializer on the beginning of the line.

Aucun commentaire:

Enregistrer un commentaire