   Printing an "int" to the screen
  Does anybody know how to print an "int" to the screen?  For example, I tried:int temp = 12;printf(temp);and it gave me this error:error C2664: ''printf'' : cannot convert parameter 1 from ''int'' to ''const char *''   Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style castError executing cl.exe. 
  I''m not a C programmer, but I believe it would be printf("%d", temp);  C++:cout << temp; ;  C: printf("%d", temp); C++: std::cout << temp;“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”    — Brian W. Kernighan (C programming language co-inventor) [edited by - Fruny on February 19, 2004 4:58:43 PM];  you can also useprintf( "%i", temp );  - Google - MSDN Library - GameDev.net Articles & Resources - Wikipedia The Free Encyclopedia -  