User forums > Help

print address of a pointer in decimal mode.

(1/1)

phR689:
when i try to print the address of a pointer in a decimal mode, the compiler (GNU GCC) shows the following error.

    int age = 14;
    int *pointeurSurAge = &age;

    printf("%d", pointeurSurAge);
    return 0;

../../main.c:9:5: attention : format '%d' expects argument of type 'int', but argument 2 has type 'int *' [-Wformat

thanks for support!
 :D

stahta01:
Thank you for NOT reading the rules!

http://forums.codeblocks.org/index.php/topic,9996.0.html


Tim S.

phR689:
ok, sorry,... you think i have to report it as a bug !
 :-[

Jenna:

--- Quote from: phR689 on December 28, 2011, 09:38:58 pm ---ok, sorry,... you think i have to report it as a bug !
 :-[

--- End quote ---
No you should learn to read and ask your question in an appropriate forum.

Your question is not about C::B and therefore violates our forum rules !!

phR689:
well, sorry!
i'll be a better reader!!

regards

Navigation

[0] Message Index

Go to full version