S
stefan.istrate
I have a short int variable and I'm trying to read it with
scanf("%d",&x);
but I'm getting a warning message which sounds like this:
warning: format '%d' expects type 'int*', but argument 2 has type
'short int*'
How can I avoid this warning and still read with "scanf"? I mention
that I don't want to use "cout". Maybe this problem is for C (not for C
++), but the program is in C++ because i use after this the Standard
Template Library.
Thank you,
Stefan Istrate
scanf("%d",&x);
but I'm getting a warning message which sounds like this:
warning: format '%d' expects type 'int*', but argument 2 has type
'short int*'
How can I avoid this warning and still read with "scanf"? I mention
that I don't want to use "cout". Maybe this problem is for C (not for C
++), but the program is in C++ because i use after this the Standard
Template Library.
Thank you,
Stefan Istrate