News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

print address of a pointer in decimal mode.

Started by phR689, December 28, 2011, 09:19:30 PM

Previous topic - Next topic

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

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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 !
:-[
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