Forum Discussion
Altera_Forum
Honored Contributor
12 years agoprintf() and integer type
Hello!
I have a problem with printf() command. For this: int a = 5; printf (a); Eclipse send me warning passing argument 1 of 'printf' makes pointer from integer without a castand nothing is printed in console. What's the reason of this? Thanks.
2 Replies
- Altera_Forum
Honored Contributor
try:
printf("%d", a); C language is different from Basic. - Altera_Forum
Honored Contributor
Oh, it works, thanks a lot!