9 years, 6 months ago.

printing integer

i am holding a count in my program and after i process this count i want to display via code below

lcd.printf("count is : ", count);

by the way count is an integer.

the lcd displays only " count is : " why is the integer did not show up ?

Question relating to:

1 Answer

9 years, 6 months ago.

You need to tell it where to print the integer, it won't just put it after each other, see: http://www.cplusplus.com/reference/cstdio/printf/. So in this case you need to use: "count is : %d"

Accepted Answer