mackol Posted November 10, 2002 Share Posted November 10, 2002 fseek (fp, -1L * sizeof (STUDENT), SEEK_CUR); it says : warning C4308: negative integral constant converted to unsigned type warning C4307: '*' : integral constant overflow can someone spot the reason for the warnings thanks Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted November 12, 2002 Share Posted November 12, 2002 I think because you are multiplying a signed long with an unsigned int, it is giving the warning. Perhaps cast the return from sizeof to signed long. Link to comment Share on other sites More sharing options...
0 Steven Posted November 12, 2002 Share Posted November 12, 2002 fseek (fp, -1L * sizeof (STUDENT), SEEK_CUR); it says : warning C4308: negative integral constant converted to unsigned type warning C4307: '*' : integral constant overflow can someone spot the reason for the warnings thanks C4308 --- http://msdn.microsoft.com/library/default..../HTML/c4308.asp C4307 --- http://msdn.microsoft.com/library/en-us/vc....asp?frame=true Link to comment Share on other sites More sharing options...
0 mackol Posted November 12, 2002 Author Share Posted November 12, 2002 thanks dudez :) after posting i tried to cast it and that worked :) Link to comment Share on other sites More sharing options...
Question
mackol
it says :
warning C4308: negative integral constant converted to unsigned type
warning C4307: '*' : integral constant overflow
can someone spot the reason for the warnings
thanks
Link to comment
Share on other sites
3 answers to this question
Recommended Posts