Printf

Hey everybody,

I am currently developing a program, and I forgot how to print "%d", literally, so compiler does not recognize it as an integer, is that "'%d'"? ("%d" is just example so you can know what i mean").

I am using printf or printf_s, NOT cout and cin.

Thanks.

closed account (jyU4izwU)
printf is for:
lua script
java script
action script

BUT I can't say if it is used in coding
Last edited on
It's actually a very simple program which I write in the console (visual basic 2013) for some system calls, hoping to be helpful to everyone, most of the code I wrote I just miss the above problem.
I will go try with " ' ' " and see if it works.
You simply have to "escape" the '%' with another '%' sign. This would give the following:

printf("To print an integer, use %%d \n");
Topic archived. No new replies allowed.