scanf doesn't work
Leonitis
rubixqb@gmail.com
Fri Jun 19 13:34:00 GMT 2009
Thanks everyone for responding so fast!
My toolchain setup is the standard arm-unknown-linux-gnu configuration:
kernel headers version 2.6.29
binutils version 2.19.1
gcc 4.3.2
glibc 2.9
etc..
My test code is:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv)
{
float a;
int b;
printf("Input float: ");
scanf("%f", &a);
printf("Input is: %f\n", a);
printf("\nInput integer: ");
scanf("%d", &b);
printf("Input is: %d\n", b);
return 0;
}
My output is:
Input float: -3.5
Input is: 3.500000
Input integer: -3
Input is: -3
I'm not too familiar with what the Linux headers are for, but the kernel
version on the evaluation board is 2.6.20. Could that be the problem?
--
View this message in context: http://www.nabble.com/scanf-doesn%27t-work-tp24093905p24111583.html
Sent from the Sourceware - crossgcc list mailing list archive at Nabble.com.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list