Tiltai ir tuneliai

Taškai: 0

Compile: FAIL

tiltai.cpp: In function ‘bool compare(char*, char*)’: tiltai.cpp:23:29: warning: NULL used in arithmetic [-Wpointer-arith] for(int i = 0; c1[i] != NULL || c2[i] != NULL; i++){ ^ tiltai.cpp:23:46: warning: NULL used in arithmetic [-Wpointer-arith] for(int i = 0; c1[i] != NULL || c2[i] != NULL; i++){ ^ tiltai.cpp:24:21: warning: NULL used in arithmetic [-Wpointer-arith] if(c1[i] == NULL || c2[i] == NULL){ ^ tiltai.cpp:24:38: warning: NULL used in arithmetic [-Wpointer-arith] if(c1[i] == NULL || c2[i] == NULL){ ^ tiltai.cpp: In function ‘int main()’: tiltai.cpp:56:27: error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive] str1ID = (int)it - (int)pastatai; ^ tiltai.cpp:56:37: error: cast from ‘pastatas*’ to ‘int’ loses precision [-fpermissive] str1ID = (int)it - (int)pastatai; ^ tiltai.cpp:62:27: error: cast from ‘void*’ to ‘int’ loses precision [-fpermissive] str2ID = (int)it - (int)pastatai; ^ tiltai.cpp:62:37: error: cast from ‘pastatas*’ to ‘int’ loses precision [-fpermissive] str2ID = (int)it - (int)pastatai; ^ tiltai.cpp:46:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%i", &n); ^ tiltai.cpp:48:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s", cstr1); ^ tiltai.cpp:49:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s", cstr2); ^

nr.resulttimemessage