Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

printf() and integer type

Altera_Forum
Honored Contributor II
854 Views

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 cast 

and nothing is printed in console. 

 

What's the reason of this? 

 

Thanks.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
91 Views

try: 

 

printf("%d", a); 

 

C language is different from Basic.
Altera_Forum
Honored Contributor II
91 Views

Oh, it works, thanks a lot!

Reply