문제

When I run this program in the Nios 2 simulator I get the expected output (1.000000).

#include <stdio.h>
int main ()
{
  float  n=0; 
  printf("%f\n", ++n);
  return 0;
}

But when I run the program on the board it doesn't output anything at all in the IDE console. Where does output go? Isn't output supposed to display in the IDE console?

도움이 되었습니까?

해결책

Declare n as

float  n=0.0f;  

it will work.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top