Hi friends,
For the following piece code, there is no warning in MSVC 6 but MS VC++ .Net compiler issues the following warning:
"warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data"
Can someone please explain the reason for this warning.
Thanks!
Code:#include <stdio.h> #include <string.h> int main(void) { int len; char s[] = "Hello World"; len = strlen(s); printf("The length of the string \"%s\" is %d",s,len); printf("\n\n"); return 0; }